diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:19 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:19 +0000 |
commit | 6c09f2a45c5541e9c207d14fc7aa21a4a0066bde (patch) | |
tree | 0221189d367bf661f6f9493c4f17a03f0dd4b7d2 /completions/xsltproc | |
parent | Releasing progress-linux version 1:2.11-8~progress7.99u1. (diff) | |
download | bash-completion-6c09f2a45c5541e9c207d14fc7aa21a4a0066bde.tar.xz bash-completion-6c09f2a45c5541e9c207d14fc7aa21a4a0066bde.zip |
Merging upstream version 1:2.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'completions/xsltproc')
-rw-r--r-- | completions/xsltproc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/completions/xsltproc b/completions/xsltproc index 4cb7071..5d75596 100644 --- a/completions/xsltproc +++ b/completions/xsltproc @@ -1,13 +1,13 @@ # xsltproc(1) completion -*- shell-script -*- -_xsltproc() +_comp_cmd_xsltproc() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in --output | -o) - _filedir + _comp_compgen_filedir return ;; # TODO : number only @@ -16,8 +16,8 @@ _xsltproc() ;; --encoding) # some aliases removed - COMPREPLY=($(compgen -X '@(UTF[1378]|8859|ISO[0-9_])*' \ - -W "$(iconv -l | command sed -e 's/\/.*//')" -- "$cur")) + local encodings=$(iconv -l | command sed -e 's/\/.*//') + _comp_compgen -- -X '@(UTF[1378]|8859|ISO[0-9_])*' -W '$encodings' return ;; --param | --stringparam) @@ -25,25 +25,25 @@ _xsltproc() ;; # not really like --writesubtree --path) - _filedir -d + _comp_compgen_filedir -d return ;; --writesubtree) - _filedir -d + _comp_compgen_filedir -d return ;; esac - [[ $cword -gt 2 && $(_get_cword '' 2) == --?(string)param ]] && return + [[ $cword -gt 2 && ${words[cword - 2]} == --?(string)param ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help COMPREPLY=("${COMPREPLY[@]%:}") else # TODO: 1st file xsl|xslt, 2nd XML - _filedir '@(xsl|xslt|xml|dbk|docbook|page)' + _comp_compgen_filedir '@(xsl|xslt|xml|dbk|docbook|page)' fi } && - complete -F _xsltproc xsltproc + complete -F _comp_cmd_xsltproc xsltproc # ex: filetype=sh |