aboutsummaryrefslogtreecommitdiffstats
path: root/bash_completion
diff options
context:
space:
mode:
Diffstat (limited to 'bash_completion')
-rw-r--r--bash_completion/kerl18
1 files changed, 13 insertions, 5 deletions
diff --git a/bash_completion/kerl b/bash_completion/kerl
index 0d1860a..62efa00 100644
--- a/bash_completion/kerl
+++ b/bash_completion/kerl
@@ -18,9 +18,9 @@ _kerl()
RELEASES=`cat "$HOME/.kerl/otp_releases"`
fi
COMPREPLY=( $( compgen -W "git $RELEASES" -- "$cur") )
- else
+ else
if [ -f "$HOME/.kerl/otp_builds" ]; then
- BUILDS=`cat "$HOME/.kerl/otp_builds" | cut -d "," -f 2`
+ BUILDS=`cat "$HOME/.kerl/otp_builds" | cut -d "," -f 2`
fi
COMPREPLY=( $( compgen -W "$BUILDS" -- "$cur") )
fi
@@ -33,10 +33,18 @@ _kerl()
;;
install)
if [ -f "$HOME/.kerl/otp_builds" ]; then
- BUILDS=`cat "$HOME/.kerl/otp_builds" | cut -d "," -f 2`
+ BUILDS=`cat "$HOME/.kerl/otp_builds" | cut -d "," -f 2`
fi
COMPREPLY=( $( compgen -W "$BUILDS" -- "$cur") )
;;
+ deploy)
+ if [ "$COMP_CWORD" -eq 3 ]; then
+ if [ -f "$HOME/.kerl/otp_installations" ]; then
+ PATHS=`cat "$HOME/.kerl/otp_installations" | cut -d " " -f 2`
+ fi
+ fi
+ COMPREPLY=( $( compgen -W "$PATHS" -- "$cur") )
+ ;;
delete)
COMPREPLY=( $( compgen -W "build installation $words" -- "$cur") )
;;
@@ -46,7 +54,7 @@ _kerl()
agner)
if [ "$COMP_CWORD" -eq 3 ]; then
if [ -f "$HOME/.kerl/otp_builds" ]; then
- BUILDS=`cat "$HOME/.kerl/otp_builds" | cut -d "," -f 2`
+ BUILDS=`cat "$HOME/.kerl/otp_builds" | cut -d "," -f 2`
fi
fi
COMPREPLY=( $( compgen -W "$BUILDS" -- "$cur") )
@@ -54,7 +62,7 @@ _kerl()
*)
if [ "$COMP_CWORD" -eq 3 ]; then
if [ -f "$HOME/.kerl/otp_builds" ]; then
- BUILDS=`cat "$HOME/.kerl/otp_builds" | cut -d "," -f 2`
+ BUILDS=`cat "$HOME/.kerl/otp_builds" | cut -d "," -f 2`
fi
if [ -n "$BUILDS" ]; then
for b in $BUILDS; do