[GRASS-user] readline completion under bash

Hi

I'm working on my paper for FOSS4G2008 and was about to say something
about the lack of command completion in GRASS when I remembered seeing
the option "--with-readline" in the configure script. I can't find
anything on readline (besides the configure option) in the html docs
and I'm left wondering how to get this working under bash. Is readline
completion available in the svn source or do I need an add-on?

Thanks

Craig

Ps A search of the ML archives for "readline completion" returned zero hits.

Craig Leat wrote:

I'm working on my paper for FOSS4G2008 and was about to say something
about the lack of command completion in GRASS

http://grass.osgeo.org/wiki/GRASS_AddOns#Readline_completion
http://www.sorokine.info/grass-complete/
http://grass.osgeo.org/download/addons.php

when I remembered seeing the option "--with-readline" in the configure
script. I can't find anything on readline (besides the configure option)
in the html docs and I'm left wondering how to get this working under
bash. Is readline completion available in the svn source

compiled-in readline support is only used with r.mapcalc.

or do I need an add-on?

as above. I don't know if it will work with GRASS 6, maybe a keen user
might like to update it. tab-completion for mapname and column names
would be cool.

Ps A search of the ML archives for "readline completion" returned zero
hits.

Which search engine? using Gmane's search I found 18 in .user and 19 in
..devel, using the website's google search some are found too.
http://news.gmane.org/gmane.comp.gis.grass.devel
http://news.gmane.org/gmane.comp.gis.grass.user

Hamish

Hamish wrote:

http://grass.osgeo.org/wiki/GRASS_AddOns#Readline_completion
http://www.sorokine.info/grass-complete/
http://grass.osgeo.org/download/addons.php

compiled-in readline support is only used with r.mapcalc.

I don't know if it will work with GRASS 6, maybe a keen user
might like to update it. tab-completion for mapname and column names
would be cool.

Alas, it seems grass-complete doesn't work:
GRASS 6.3.1svn (msunduzi_lo31):~/GIS/scripts/grass-complete > . bash/Init.sh
Unable to initialize bash completions: bash is too old or too new:
BASH_VERSION= 3.2.25(1)-release (needed = 2.05)

Ps A search of the ML archives for "readline completion" returned zero
hits.

Which search engine? using Gmane's search I found 18 in .user and 19 in
..devel, using the website's google search some are found too.

http://www.nabble.com/forum/Search.jtp?query="readline+completion"&local=y&forum=1202&daterange=0&startdate=&enddate=

Now Nabble finds two posts (the above two) :slight_smile:

Thanks for the info, I needed to check my facts before announcing that
tapping out long map names in the GRASS console is a pain, especially
when you have to do it three times to combine the rgb bands.

Craig

Alas, it seems grass-complete doesn't work:
GRASS 6.3.1svn (msunduzi_lo31):~/GIS/scripts/grass-complete > . bash/Init.sh
Unable to initialize bash completions: bash is too old or too new:
BASH_VERSION= 3.2.25(1)-release (needed = 2.05)

I had contacted the author of Grass completions a few years ago
to see if he was interested in perhaps updating it to a newer
version of Bash:

http://article.gmane.org/gmane.comp.gis.grass.user/13851/match=completion

He showed some interest at the time, but I never heard anything further on it.

~ Eric.

On Sep 19 [15:41], Craig Leat wrote:

Thanks for the info, I needed to check my facts before announcing that
tapping out long map names in the GRASS console is a pain, especially
when you have to do it three times to combine the rgb bands.

I have a little workaround for that: I put the name of the base dataset
in a temporary variable.
for example:

r=demOfMyRegionVersion2beta_20080919
g.region rast=$r
d.rast $r

Not quite command-line completion, but it saves me some typing.

cheers,
\flo.