zsh-workers
 help / color / mirror / code / Atom feed
905aa0645a67e9ebbe3c2635707487aecb1145a7 blob 785 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 
#compdef chflags

local own='-g *(-u$EUID)'
local -a args recurse

(( ! EUID || $+_comp_priv_prefix )) && own=

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 $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)]' \
  '(-L -H)-P[do not follow symlinks (specify with -R)]'
debug log:

solving 905aa0645 ...
found 905aa0645 in https://git.vuxu.org/mirror/zsh/

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).