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/chgrp | |
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/chgrp')
-rw-r--r-- | completions/chgrp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/completions/chgrp b/completions/chgrp index 4793a45..1e19750 100644 --- a/completions/chgrp +++ b/completions/chgrp @@ -1,39 +1,39 @@ # chgrp(1) completion -*- shell-script -*- -_chgrp() +_comp_cmd_chgrp() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return cur=${cur//\\\\/} if [[ $prev == --reference ]]; then - _filedir + _comp_compgen_filedir return fi - $split && return + [[ $was_split ]] && return # options completion if [[ $cur == -* ]]; then - local w opts + local w opts="" for w in "${words[@]}"; do [[ $w == -@(R|-recursive) ]] && opts="-H -L -P" && break done - COMPREPLY=($(compgen -W '-c -h -f -R -v --changes --dereference + _comp_compgen -- -W '-c -h -f -R -v --changes --dereference --no-dereference --silent --quiet --reference --recursive --verbose - --help --version $opts' -- "$cur")) + --help --version $opts' return fi # first parameter on line or first since an option? if [[ $cword -eq 1 && $cur != -* || $prev == -* ]]; then - _allowed_groups "$cur" + _comp_compgen_allowed_groups else - _filedir + _comp_compgen_filedir fi } && - complete -F _chgrp chgrp + complete -F _comp_cmd_chgrp chgrp # ex: filetype=sh |