[GRASS5] Readline completion for grass

Daniel Calvelo Aros dcalvelo at minag.gob.pe
Thu May 26 05:45:21 EDT 2005


Hi all,

With some recent threads about immediate availability of layers list, column
names and so on, I recalled the possibilities of customised tab-completion in
bash.

Here is a first try at having useful tab-completion for grass. The goal is to
have mapname, layername, filename, columname completion and so on. For now,
just becoming acquainted with readline within bash, I have the following:

- tab-completion for commands works as always
- after a command, you have tab-completion for options and flags
- within options, you have tab-completion for fixed value sets

I also played along but still didn't integrate layername and database
columnname completion.

Please give this a try and comment on it. I'd like to know whether it might be
useful enough to complete (sic) it.

To enable the current features, source this file from bash, e.g. '. filename'.
If your shell isn't a current enough version of bash, the script will do nothing.

More to follow, but "release early" as the saying goes.

Oh, and so many thanks to whomever came up with --interface-description in
parser.c

Good night.

-- Daniel Calvelo Aros

-------------- next part --------------
A non-text attachment was scrubbed...
Name: grass_rlcompleter-v0.sh
Type: application/octet-stream
Size: 2747 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20050526/3862537c/grass_rlcompleter-v0.obj


More information about the grass-dev mailing list