diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:18 +0000 |
commit | f4acb49ea148cdd899f7f29f1591c7bc853c2135 (patch) | |
tree | b62d60873864065d6428a84a119dd8a3c90f1397 /completions/oggdec | |
parent | Adding upstream version 1:2.11. (diff) | |
download | bash-completion-f4acb49ea148cdd899f7f29f1591c7bc853c2135.tar.xz bash-completion-f4acb49ea148cdd899f7f29f1591c7bc853c2135.zip |
Adding upstream version 1:2.12.0.upstream/1%2.12.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'completions/oggdec')
-rw-r--r-- | completions/oggdec | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/completions/oggdec b/completions/oggdec index 97bde20..a76ba49 100644 --- a/completions/oggdec +++ b/completions/oggdec @@ -1,38 +1,40 @@ # bash completion for oggdec(1) -*- shell-script -*- -_oggdec() +_comp_cmd_oggdec() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return + local noargopts='!(-*|*[beso]*)' + # shellcheck disable=SC2254 case $prev in - --help | --version | -!(-*)[hV]*) + --help | --version | -${noargopts}[hV]*) return ;; - --bits | -!(-*)b) - COMPREPLY=($(compgen -W "8 16" -- "$cur")) + --bits | -${noargopts}b) + _comp_compgen -- -W "8 16" return ;; - --endianness | --sign | -!(-*)[es]) - COMPREPLY=($(compgen -W "0 1" -- "$cur")) + --endianness | --sign | -${noargopts}[es]) + _comp_compgen -- -W "0 1" return ;; - --output | -!(-*)o) - _filedir wav + --output | -${noargopts}o) + _comp_compgen_filedir wav return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi - _filedir ogg + _comp_compgen_filedir ogg } && - complete -F _oggdec oggdec + complete -F _comp_cmd_oggdec oggdec # ex: filetype=sh |