diff options
Diffstat (limited to 'completions/xsltproc')
-rw-r--r-- | completions/xsltproc | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/completions/xsltproc b/completions/xsltproc index 2782f805..7c38591f 100644 --- a/completions/xsltproc +++ b/completions/xsltproc @@ -1,11 +1,9 @@ -# xsltproc(1) completion +# xsltproc(1) completion -*- shell-script -*- -have xsltproc && _xsltproc() { - local cur prev - COMPREPLY=() - _get_comp_words_by_ref cur prev + local cur prev words cword + _init_completion || return case $prev in --output|-o) @@ -36,21 +34,16 @@ _xsltproc() ;; esac - [[ $COMP_CWORD -gt 2 && `_get_cword '' 2` == --?(string)param ]] && \ + [[ $cword -gt 2 && `_get_cword '' 2` == --?(string)param ]] && \ return 0 if [[ "$cur" == -* ]]; then - _longopt xsltproc + COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) + COMPREPLY=( "${COMPREPLY[@]%:}" ) else _filedir '@(xsl|xslt|xml)' fi } && complete -F _xsltproc xsltproc -# 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 |