From 0daeaa064d20dd3f72d4df6c105deba8e24c4543 Mon Sep 17 00:00:00 2001 From: sanmiguel Date: Sat, 18 Feb 2017 14:37:43 +0100 Subject: Extend bash completion for 'kerl path' --- bash_completion/kerl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bash_completion/kerl b/bash_completion/kerl index 689463d..d620a4d 100644 --- a/bash_completion/kerl +++ b/bash_completion/kerl @@ -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" ) ) @@ -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 -- cgit v1.2.3