From f2621414ee5f2f601424c22f00e207903e3b6104 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 03:03:18 +0200 Subject: Merging upstream version 1:2.12.0. Signed-off-by: Daniel Baumann --- completions/oggdec | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'completions/oggdec') 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 -- cgit v1.2.3