If you use bash as command shell, you can take advantage of the completion facilities when using the genet command line tool.

Setup

To enable bash completion, get this file. Then, in your shell, type

. genet-bash-completion.sh

Before, you should have enabled bash completion, for example by adding the following code to your ~/.bashrc file:

if [ -f /etc/bash_completion ]; then
        . /etc/bash_completion
fi
Using completion

Once the completion is enabled, you can try it:

$ genet <TAB>

This should help you type your genet commands.

Completion of arguments requires you to be in your genet project directory, i.e. the directory where the config.txt file is. Indeed, to propose completion of arguments (urls, ...), the completion code must be aware of the database to connect to, hence it needs the config.txt file to be in the current directory.

The completion facility is quite powerful, as shows the following example when adding a port:

/tmp/genet-example/$ ls config.txt
config.txt
/tmp/genet-example/$ ls genet add p<TAB>
/tmp/genet-example/$ genet add port <TAB>
--config
--version
-p
-v
http://localhost:8082/tools/average/interfaces/line-length
http://localhost:8082/tools/split-text/interfaces/split-in-words
http://localhost:8082/tools/words/interfaces/unique-words
/tmp/genet-example/$ genet add port h<TAB>
http://localhost:8082/tools/average/interfaces/line-length
http://localhost:8082/tools/split-text/interfaces/split-in-words
http://localhost:8082/tools/words/interfaces/unique-words
/tmp/genet-example/$ genet add port http://localhost:8082/tools/average/interfaces/l<TAB>
--config   --version  -p         -v         in         out
/tmp/genet-example/$ genet add port http://localhost:8082/tools/average/interfaces/line-length in<TAB>
--config   --version  -p         -v         average    text       words
/tmp/genet-example/$ genet add port http://localhost:8082/tools/average/interfaces/line-length in a<TAB>
/tmp/genet-example/$ genet add port http://localhost:8082/tools/average/interfaces/line-length in average