mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-03 08:11:03 +02:00
23 lines
574 B
Text
23 lines
574 B
Text
#compdef chflags
|
|
|
|
local args own='-g *(-u$EUID)'
|
|
|
|
(( ! EUID || $+_comp_priv_prefix )) && own=
|
|
|
|
if [[ $OSTYPE = (darwin|dragonfly|freebsd)* ]]; then
|
|
args=(
|
|
"-f[don't display diagnostic messages]"
|
|
'-v[verbose output]'
|
|
)
|
|
fi
|
|
|
|
_arguments -s -A "-*" : $args \
|
|
': :_file_flags' \
|
|
'*:file:_files "$own"' \
|
|
- opth \
|
|
'-h[act on symlinks]' \
|
|
- optR \
|
|
'-R[recurse directories]' \
|
|
'(-L -P)-H[follow symlinks on the command line (specify with -R)]' \
|
|
'(-H -P)-L[follow all symlinks (specify with -R)]' \
|
|
'(-L -H)-P[do not follow symlinks (specify with -R)]'
|