diff options
Diffstat (limited to 'completions/cksfv')
-rw-r--r-- | completions/cksfv | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/completions/cksfv b/completions/cksfv index 1f83824b..d21bcf39 100644 --- a/completions/cksfv +++ b/completions/cksfv @@ -1,20 +1,17 @@ -# cksfv completion by Chris <xris@forevermore.net> +# cksfv completion by Chris <xris@forevermore.net> -*- shell-script -*- -have cksfv && _cksfv() { - local cur prev + local cur prev words cword + _init_completion || return - COMPREPLY=() - _get_comp_words_by_ref cur prev - - if [ $COMP_CWORD -eq 1 ]; then - COMPREPLY=( $( compgen -W '-C -f -i -q -v' -- "$cur" ) ) + if [ $cword -eq 1 ]; then + COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) return 0 fi case "$prev" in - -C) + -C|-g) _filedir -d return 0 ;; @@ -29,10 +26,4 @@ _cksfv() } && complete -F _cksfv cksfv -# 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 |