Setting Up Command Completion for the d4st Command
You can set up tab completion for the parameters to the d4st command.
The bash shell includes a general tab completion feature that can be set up for any command. The D4ST project includes a completion script for the d4st command, bash_completion.d/d4st.bash-completion.
To set up command completion for the d4st command you link or copy the d4st.bash-completion to the appropriate directory for your bash environment.
In addition, the d4st command must be in your PATH environment variable.
Command Completion Setup: macOS
You must have bash completion installed. See http://davidalger.com/development/bash-completion-on-os-x-with-brew/ for instructions on using homebrew to install bash completion if you haven't already.
$ cd d4st/bash_completion.d $ ln -s $PWD/d4st.bash-completion `brew --prefix`/etc/bash_completion.d/d4st $ source `brew --prefix`/etc/bash_completion.d/d4st
Mako:bash_completion.d ekimber$ d4st addhooks cleanimages gitlab log-gitlab pause stop up cleanall down kill make-gitlab-project pull test-gitlab cleancontainers getdemo linkmgr make-gitlab-user start unpause Mako:bash_completion.d ekimber$ d4st
Command Completion Setup: Windows git bash shell
Not entirely sure what the best way to set this up permanently is.
$ cat ~/.bash_profile if [ -f ~/.bashrc ]; then . ~/.bashrc; fi export PATH=$PATH:/c/Users/ekimber/apps/d4st-docker source "/c/Users/ekimber/apps/d4st-docker/bash_completion.d/d4st.bash-completion" $
ekimber@WIN-HH0I81E3DAU MINGW64 / $ d4st addhooks getdemo make-gitlab-project stop cleanall gitlab make-gitlab-user test-gitlab cleancontainers kill pause unpause cleanimages linkmgr pull up down log-gitlab start ekimber@WIN-HH0I81E3DAU MINGW64 /
Command Completion Setup: Linux
$ cd d4st/bash_completion.d $ sudo ln -s $PWD/d4st.bash-completion /etc/bash_completion.d/d4st
ekimber@WIN-HH0I81E3DAU:/mnt/c/Users/ekimber/apps/d4st-docker$ d4st addhooks down linkmgr pause test-gitlab cleanall getdemo log-gitlab pull unpause cleancontainers gitlab make-gitlab-project start up cleanimages kill make-gitlab-user stop ekimber@WIN-HH0I81E3DAU:/mnt/c/Users/ekimber/apps/d4st-docker$