summary refs log tree commit diff
path: root/Completion/BSD/Command
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2016-07-08 23:09:18 +0200
committerOliver Kiddle <opk@zsh.org>2016-07-08 23:10:41 +0200
commit304aa25184f927ccc034bb98f6ac744d29006bb4 (patch)
treedf1810ccaf5e223913493bce2e2e3528a3667820 /Completion/BSD/Command
parent13f4bb29363e2a4c6a6e2971a929bd677043d866 (diff)
downloadzsh-304aa25184f927ccc034bb98f6ac744d29006bb4.tar.gz
zsh-304aa25184f927ccc034bb98f6ac744d29006bb4.tar.xz
zsh-304aa25184f927ccc034bb98f6ac744d29006bb4.zip
38812: a few new completions and update some command options
Diffstat (limited to 'Completion/BSD/Command')
-rw-r--r--Completion/BSD/Command/_chflags30
1 files changed, 25 insertions, 5 deletions
diff --git a/Completion/BSD/Command/_chflags b/Completion/BSD/Command/_chflags
index c9f26249d..bfbaa018f 100644
--- a/Completion/BSD/Command/_chflags
+++ b/Completion/BSD/Command/_chflags
@@ -1,6 +1,6 @@
 #compdef chflags
 
-local flags own='-g *(-u$EUID)'
+local flags args own='-g *(-u$EUID)'
 
 flags=(
   '(noopaque)opaque[set the opaque flag]'
@@ -14,7 +14,7 @@ flags=(
 )
 
 if (( ! EUID )); then
-  flags=( $flags[@]
+  flags+=(
     '(noarch)arch[set the archived flag]'
     '(arch)noarch[unset the archived flag]'
     '(nosappnd)sappnd[set the system append-only flag]'
@@ -26,19 +26,39 @@ if (( ! EUID )); then
 fi
 
 if [[ $OSTYPE = (freebsd|dragonfly|darwin)* ]]; then
-  flags=( $flags[@]
+  flags+=(
     '(nouunlnk)uunlnk[set the user undeletable flag]'
     '(uunlnk)nouunlnk[unset the user undeletable flag]'
     '(nohidden)hidden[set the hidden flag]'
     '(hidden)nohidden[unset the hidden flag]'
   )
-  (( EUID )) || flags=( $flags[@]
+  [[ $OSTYPE = freebsd* ]] && flags+=(
+    '(uoffline)offline[set the offline attribute]'
+    '(offline)uoffline[unset the offline attribute]'
+    '(urdonly)rdonly[set readonly flag]'
+    '(rdonly)urdonly[unset readonly flag]'
+    '(usparse)sparse[set the sparse attribute]'
+    '(sparse)usparse[unset the sparse attribute]'
+    '(usystem)system[set system flag]'
+    '(system)usystem[unset system flag]'
+    '(ureparse)reparse[set the Windows reparse point attribute]'
+    '(reparse)ureparse[unset the Windows reparse point attribute]'
+    '(uunlnk)unlnk[set undeletable flag]'
+    '(unlnk)uunlnk[unset undeletable flag]'
+  )
+
+  (( EUID )) || flags+=(
     '(nosunlnk)sunlnk[set the system undeletable flag]'
     '(sunlnk)nosunlnk[unset the system undeletable flag]'
   )
+  args=(
+    "-f[don't display diagnostic messages]"
+    '-h[act on symlinks]'
+    '-v[verbose output]'
+  )
 fi
 
-_arguments -s -A "-*" \
+_arguments -s -A "-*" $args \
   '(-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)]' \