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 | f2621414ee5f2f601424c22f00e207903e3b6104 (patch) | |
tree | 56a856dafd1ca684bb23263cacaa723ee4f404fc /completions/oggdec | |
parent | Adding debian version 1:2.11-8. (diff) | |
download | bash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.tar.xz bash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.zip |
Merging upstream version 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 |