diff options
Diffstat (limited to 'completions/larch')
-rw-r--r-- | completions/larch | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/completions/larch b/completions/larch index e58374f7..f6f796b2 100644 --- a/completions/larch +++ b/completions/larch @@ -1,14 +1,12 @@ -# larch(1) completion by Alex Shinn <foof@synthcode.com> +# larch(1) completion -*- shell-script -*- +# by Alex Shinn <foof@synthcode.com> -have larch && _larch() { - local cur prev + local cur prev words cword + _init_completion || return - COMPREPLY=() - _get_comp_words_by_ref cur prev - - if [[ $COMP_CWORD -eq 1 || "$prev" == -* ]]; then + if [[ $cword -eq 1 || "$prev" == -* ]]; then COMPREPLY=( $( compgen -W ' \ my-id my-default-archive register-archive whereis-archive archives \ init-tree tree-root tree-version set-tree-version inventory \ @@ -39,10 +37,4 @@ _larch() } && complete -F _larch -o default larch -# 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 |