diff options
Diffstat (limited to 'completions/abook')
-rw-r--r-- | completions/abook | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/completions/abook b/completions/abook index f09c8b50..07a0f090 100644 --- a/completions/abook +++ b/completions/abook @@ -1,16 +1,12 @@ -# abook(1) completion +# abook(1) completion -*- shell-script -*- -have abook && _abook() { - local cur prev + local cur prev words cword + _init_completion || return - COMPREPLY=() - _get_comp_words_by_ref cur prev - - # abook only takes options, tabbing after command name adds a single - # dash (bash4) - [[ ${BASH_VERSINFO[0]} -ge 4 && $COMP_CWORD -eq 1 && -z "$cur" ]] && + # abook only takes options, tabbing after command name adds a single dash + [[ $cword -eq 1 && -z "$cur" ]] && { compopt -o nospace COMPREPLY=( "-" ) @@ -53,10 +49,4 @@ _abook() } && complete -F _abook abook -# Local variables: -# mode: shell-script -# sh-basic-offset: 4 -# sh-indent-comment: t -# indent-tabs-mode: nil -# End: # ex: ts=4 sw=4 et filetype=sh |