summaryrefslogtreecommitdiffstats
path: root/completions/chown
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:19 +0000
commit6c09f2a45c5541e9c207d14fc7aa21a4a0066bde (patch)
tree0221189d367bf661f6f9493c4f17a03f0dd4b7d2 /completions/chown
parentReleasing progress-linux version 1:2.11-8~progress7.99u1. (diff)
downloadbash-completion-6c09f2a45c5541e9c207d14fc7aa21a4a0066bde.tar.xz
bash-completion-6c09f2a45c5541e9c207d14fc7aa21a4a0066bde.zip
Merging upstream version 1:2.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'completions/chown')
-rw-r--r--completions/chown32
1 files changed, 16 insertions, 16 deletions
diff --git a/completions/chown b/completions/chown
index 1d746b7..25d0d67 100644
--- a/completions/chown
+++ b/completions/chown
@@ -1,46 +1,46 @@
# chown(1) completion -*- shell-script -*-
-_chown()
+_comp_cmd_chown()
{
- local cur prev words cword split
+ local cur prev words cword was_split comp_args
# Don't treat user:group as separate words.
- _init_completion -s -n : || return
+ _comp_initialize -s -n : -- "$@" || return
case "$prev" in
--from)
- _usergroup
+ _comp_compgen_usergroups
return
;;
--reference)
- _filedir
+ _comp_compgen_filedir
return
;;
esac
- $split && return
+ [[ $was_split ]] && return
if [[ $cur == -* ]]; then
# Complete -options
- 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 --from --silent --quiet --reference --recursive
- --verbose --help --version $opts' -- "$cur"))
+ --verbose --help --version $opts'
else
- local args
+ local REPLY
- # The first argument is an usergroup; the rest are filedir.
- _count_args :
+ # The first argument is a usergroup; the rest are filedir.
+ _comp_count_args
- if ((args == 1)); then
- _usergroup -u
+ if ((REPLY == 1)); then
+ _comp_compgen_usergroups -u
else
- _filedir
+ _comp_compgen_filedir
fi
fi
} &&
- complete -F _chown chown
+ complete -F _comp_cmd_chown chown
# ex: filetype=sh