Skip to content

Commit

Permalink
Extend bash completion for 'kerl path'
Browse files Browse the repository at this point in the history
  • Loading branch information
sanmiguel committed Feb 18, 2017
1 parent 2793ae4 commit 0daeaa0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bash_completion/kerl
Expand Up @@ -12,7 +12,7 @@ _kerl()

case $prev in
kerl)
COMPREPLY=( $( compgen -W "build install update list delete active status" -- "$cur" ) )
COMPREPLY=( $( compgen -W "build install update list delete active path status" -- "$cur" ) )
;;
list)
COMPREPLY=( $( compgen -W "releases builds installations" -- "$cur" ) )
Expand Down Expand Up @@ -42,6 +42,13 @@ _kerl()
fi
COMPREPLY=( $( compgen -W "$BUILDS" -- "$cur") )
;;
path)
INSTALL_LIST="$HOME"/.kerl/otp_installations
if [ -f "$INSTALL_LIST" ]; then
NAMES=$(cut -d ' ' -f 2 "$INSTALL_LIST" | xargs basename)
fi
COMPREPLY=( $( compgen -W "$NAMES" -- "$cur") )
;;
deploy)
if [ "$COMP_CWORD" -eq 3 ]; then
if [ -f "$HOME"/.kerl/otp_installations ]; then
Expand Down

0 comments on commit 0daeaa0

Please sign in to comment.