Fixed "bash-it help aliases" completion - it will now show the available aliases

pull/1043/head
Nils Winkler 2017-09-15 08:10:16 +02:00
parent 298b9c6455
commit c786c14859
1 changed files with 8 additions and 13 deletions

View File

@ -73,9 +73,14 @@ _bash-it-comp()
return 0 return 0
;; ;;
help) help)
if [ x"${prev}" == x"aliases" ]; then
_bash-it-comp-list-available aliases
return 0
else
local help_args="plugins aliases completions migrate update" local help_args="plugins aliases completions migrate update"
COMPREPLY=( $(compgen -W "${help_args}" -- ${cur}) ) COMPREPLY=( $(compgen -W "${help_args}" -- ${cur}) )
return 0 return 0
fi
;; ;;
update | search | migrate) update | search | migrate)
return 0 return 0
@ -105,16 +110,6 @@ _bash-it-comp()
;; ;;
esac esac
;; ;;
aliases)
prevprev="${COMP_WORDS[COMP_CWORD-2]}"
case "${prevprev}" in
help)
_bash-it-comp-list-available aliases
return 0
;;
esac
;;
esac esac
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )