diff options
-rw-r--r-- | README.md | 16 | ||||
-rwxr-xr-x | cbt | 7 | ||||
-rwxr-xr-x | shell-integration/cbt-completions.bash (renamed from completions/cbt) | 0 |
3 files changed, 16 insertions, 7 deletions
@@ -176,3 +176,19 @@ solution could be code generating traits at build-time and mixing them in ad-hoc. It's a build-tool after all. Build-time code-generation and class loading is not rocket science. But there may be simpler solutions for the cases at hand. And they are edge cases anyways. + +Bash completions +---------------- +To auto-complete cbt task names in bash do this: + +``` +mkdir ~/.bash_completion.d/ +cp shell-integration/cbt-completions.bash ~/.bash_completion.d/ +``` + +Add this to you .bashrc +``` +for f in ~/.bash_completion.d/*; do + source $f +done +``` @@ -109,13 +109,6 @@ log "Find out real path. Build realpath if needed." $* export CBT_HOME=$(dirname $($_DIR/realpath/realpath.sh $0)) - -if [ ! -f /etc/bash_completion.d/cbt ]; then - sudo cp $CBT_HOME/completions/cbt /etc/bash_completion.d/cbt - # reload shell so completions work - exec bash -fi - export NAILGUN=$CBT_HOME/nailgun_launcher/ export TARGET=target/scala-2.11/classes/ mkdir -p $NAILGUN$TARGET diff --git a/completions/cbt b/shell-integration/cbt-completions.bash index c591321..c591321 100755 --- a/completions/cbt +++ b/shell-integration/cbt-completions.bash |