diff options
author | Joe Rayhawk <jrayhawk@fairlystable.org> | 2025-04-30 02:07:56 -0700 |
---|---|---|
committer | Joe Rayhawk <jrayhawk@fairlystable.org> | 2025-04-30 02:07:56 -0700 |
commit | 26e09889646be3ea65b4a3dfeda26213e4bb6a27 (patch) | |
tree | 4f3c73a9416bf47ad7e125383d23cf42879e38d7 /Completion/BSD/Command/_chflags | |
parent | 841bce705a58b04220b1f257abcc00ae71cbdbdc (diff) | |
parent | 001cba48ce3b964cf01fb3e2af54b20eacbc9bf5 (diff) | |
download | zsh-26e09889646be3ea65b4a3dfeda26213e4bb6a27.tar.gz zsh-26e09889646be3ea65b4a3dfeda26213e4bb6a27.zip |
Merge branch 'upstream' into debian
Diffstat (limited to 'Completion/BSD/Command/_chflags')
-rw-r--r-- | Completion/BSD/Command/_chflags | 25 |
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)]' \ |