From c786c148595118a2b3d48120a8cbce4da5e44bae Mon Sep 17 00:00:00 2001 From: Nils Winkler Date: Fri, 15 Sep 2017 08:10:16 +0200 Subject: [PATCH] Fixed "bash-it help aliases" completion - it will now show the available aliases --- completion/available/bash-it.completion.bash | 21 ++++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/completion/available/bash-it.completion.bash b/completion/available/bash-it.completion.bash index 28711710..3651e086 100644 --- a/completion/available/bash-it.completion.bash +++ b/completion/available/bash-it.completion.bash @@ -73,9 +73,14 @@ _bash-it-comp() return 0 ;; help) - local help_args="plugins aliases completions migrate update" - COMPREPLY=( $(compgen -W "${help_args}" -- ${cur}) ) - return 0 + if [ x"${prev}" == x"aliases" ]; then + _bash-it-comp-list-available aliases + return 0 + else + local help_args="plugins aliases completions migrate update" + COMPREPLY=( $(compgen -W "${help_args}" -- ${cur}) ) + return 0 + fi ;; update | search | migrate) return 0 @@ -105,16 +110,6 @@ _bash-it-comp() ;; esac ;; - aliases) - prevprev="${COMP_WORDS[COMP_CWORD-2]}" - - case "${prevprev}" in - help) - _bash-it-comp-list-available aliases - return 0 - ;; - esac - ;; esac COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )