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/ccze | |
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/ccze')
-rw-r--r-- | completions/ccze | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/completions/ccze b/completions/ccze index 35f4c3f..31602b0 100644 --- a/completions/ccze +++ b/completions/ccze @@ -1,44 +1,45 @@ # ccze(1) completion -*- shell-script -*- -_ccze() +_comp_cmd_ccze() { - 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='!(-*|*[acFmop]*)' + # shellcheck disable=SC2254 case $prev in -'?' | --help | --usage | -V | --version) return ;; - --argument | --color | -!(-*)[ac]) + --argument | --color | -${noargopts}[ac]) # TODO? return ;; - --rcfile | -!(-*)F) - _filedir + --rcfile | -${noargopts}F) + _comp_compgen_filedir return ;; - --mode | -!(-*)m) - COMPREPLY=($(compgen -W "curses ansi html" -- "$cur")) + --mode | -${noargopts}m) + _comp_compgen -- -W "curses ansi html" return ;; - --option | -!(-*)o) + --option | -${noargopts}o) local -a opts=(scroll wordcolor lookups transparent cssfile) - COMPREPLY=($(compgen -W '${opts[@]} ${opts[@]/#/no}' -- "$cur")) + _comp_compgen -- -W '"${opts[@]}" "${opts[@]/#/no}"' return ;; - --plugin | -!(-*)p) - COMPREPLY=($(compgen -W '$("$1" --list-plugins | command \ - sed -ne "s/^\([a-z0-9]\{1,\}\)[[:space:]]\{1,\}|.*/\1/p")' \ - -- "$cur")) + --plugin | -${noargopts}p) + _comp_compgen_split -- "$("$1" --list-plugins | command \ + sed -ne 's/^\([a-z0-9]\{1,\}\)[[:space:]]\{1,\}|.*/\1/p')" return ;; esac - $split && return + [[ $was_split ]] && return - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace } && - complete -F _ccze ccze + complete -F _comp_cmd_ccze ccze # ex: filetype=sh |