Skip to content

Shell completion

Marco Clemencic requested to merge shell-completion into master

The idea, started from a discussion on LbDevTools!18 (merged), is that various packages can contribute shell completion functions.

The functions should go in dedicated subdirectories under share:

  • bash -> share/bash-completion/completions/

For bash the rule is that each command should have the corresponding completion code in a file called _<command> (e.g. _lb-run for lb-run), which enables dynamic loading of completion functions if available (as per Files not starting by _ are meant to be always sourced.

To enable auto completion, bash users should modify their ~/.bash_completion to source $VIRTUAL_ENV/share/bash-completion/bash_completion.

Edited by Marco Clemencic

Merge request reports