tab completions for bash are by now in upstream.
this is just a bash port of pseyfert/lb-zsh.
See this screencast
get the code
ssh lxplus.cern.ch
git clone https://github.com/pseyfert/lb-bash.git .bash_completion.d
load it by default by adding the following to your $HOME/.bash_completion
file
for v in $(ls $HOME/.bash_completion.d/ | grep -v LICENSE | grep -v README | grep -v logo | grep -v svg)
do
. $HOME/.bash_completion.d/$v
done
(okay, loading the files is not super elegant, cleanup needed)
As personal preference, I also put
TAB: menu-complete
set show-all-if-ambiguous on
into $HOME/.inputrc
.
lists all getpack'able packages
completes git lb-checkout [branches and tags] [packages in the chosen project]
suggest projects (not only the application projects like Brunel and DaVinci, but also Rec)
The lhcb login scripts already set the bash prompt when invoking SetupProject
or lb-run XXXX bash
. To use this feature, you can set the following in your
~/.bashrc
export SP_PROMPT="yes"