about summary refs log tree commit diff
path: root/Completion/BSD/Command/_chflags
blob: f97d1cdd12892b3eb54542db119c604385f0cbff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#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 \
  ': :_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)]'