summaryrefslogtreecommitdiff
path: root/Completion/BSD/Command
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2023-11-22 00:07:37 +0100
committerOliver Kiddle <opk@zsh.org>2023-11-22 00:07:37 +0100
commit6aa15f57fd5bee298c8320dab19d167dac3d46ed (patch)
treef0559c7140c34ac7aae7772a9b8d9f7debe7f8d9 /Completion/BSD/Command
parentfcf080ab578de00c799eb287ef8bdc201c313fee (diff)
downloadzsh-6aa15f57fd5bee298c8320dab19d167dac3d46ed.tar.gz
zsh-6aa15f57fd5bee298c8320dab19d167dac3d46ed.zip
52315: completion options update
Diffstat (limited to 'Completion/BSD/Command')
-rw-r--r--Completion/BSD/Command/_chflags25
1 files changed, 17 insertions, 8 deletions
diff --git a/Completion/BSD/Command/_chflags b/Completion/BSD/Command/_chflags
index 924b09acd..905aa0645 100644
--- a/Completion/BSD/Command/_chflags
+++ b/Completion/BSD/Command/_chflags
@@ -1,22 +1,31 @@
#compdef chflags
-local args own='-g *(-u$EUID)'
+local own='-g *(-u$EUID)'
+local -a args recurse
(( ! EUID || $+_comp_priv_prefix )) && own=
-if [[ $OSTYPE = (darwin|dragonfly|freebsd)* ]]; then
- args=(
- "-f[don't display diagnostic messages]"
- '-v[verbose output]'
- )
-fi
+case $OSTYPE in
+ (darwin|dragonfly|freebsd)*)
+ args=(
+ "-f[don't display diagnostic messages]"
+ '-v[verbose output]'
+ )
+ ;|
+ darwin*|freebsd*)
+ recurse=( "-x[don't cross mount points]" )
+ ;|
+ netbsd*)
+ args=( '-d[if the change requested would not alter the flags, attempt no change]' )
+ ;|
+esac
_arguments -s -A "-*" : $args \
': :_file_flags' \
'*:file:_files "$own"' \
- opth \
'-h[act on symlinks]' \
- - optR \
+ - optR $recurse \
'-R[recurse directories]' \
'(-L -P)-H[follow symlinks on the command line (specify with -R)]' \
'(-H -P)-L[follow all symlinks (specify with -R)]' \