diff --git a/completion.bash b/completion.bash index dbda4ba..b4a3fcf 100644 --- a/completion.bash +++ b/completion.bash @@ -40,7 +40,13 @@ _abra_complete_apps() _abra_complete() { - compopt +o default +o nospace + # https://github.com/andsens/homeshick/blob/master/completions/homeshick-completion.bash + if $_HOMESHICK_HAS_COMPOPT; then + compopt +o default +o nospace + COMPREPLY=() + else + COMPREPLY=('') + fi local -r cmds=' app @@ -113,4 +119,11 @@ _abra_complete() fi } +# https://github.com/andsens/homeshick/blob/master/completions/homeshick-completion.bash +if type compopt &>/dev/null; then + _ABRA_HAS_COMPOPT=true +else + _ABRA_HAS_COMPOPT=false +fi + complete -o default -F _abra_complete abra