summary refs log tree commit diff
path: root/Completion/Unix
diff options
context:
space:
mode:
authorMatthew Martin <phy1729@gmail.com>2019-03-18 22:14:37 -0500
committerMatthew Martin <phy1729@gmail.com>2019-03-18 22:17:54 -0500
commit6331772c5b35ff9d4deb80ff9461d04b5e0d2db5 (patch)
treee90f36d9800ee50ee6ce80a6e5aa2fa3e5b9f482 /Completion/Unix
parent2f670be951b1b6e242691562a9daf06010bfce99 (diff)
downloadzsh-6331772c5b35ff9d4deb80ff9461d04b5e0d2db5.tar.gz
zsh-6331772c5b35ff9d4deb80ff9461d04b5e0d2db5.tar.xz
zsh-6331772c5b35ff9d4deb80ff9461d04b5e0d2db5.zip
44135: Add chmod builtin
Diffstat (limited to 'Completion/Unix')
-rw-r--r--Completion/Unix/Command/_chmod13
1 files changed, 11 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_chmod b/Completion/Unix/Command/_chmod
index 6a44a4ef1..43c515485 100644
--- a/Completion/Unix/Command/_chmod
+++ b/Completion/Unix/Command/_chmod
@@ -1,12 +1,21 @@
-#compdef chmod gchmod
+#compdef chmod gchmod zf_chmod
 
 local curcontext="$curcontext" state line expl ret=1 variant
 local -a args privs
 
 args=( '*: :->files' '1: :_file_modes' )
 
-_pick_variant -r variant gnu=Free\ Soft $OSTYPE --version
+_pick_variant -r variant -b zsh gnu=Free\ Soft $OSTYPE --version
 case "$variant" in
+  zsh)
+    # Assign, not append because zf_chmod only supports octal modes.
+    args=(
+      '-R[change files and directories recursively]'
+      '-s[enable paranoid behavior]'
+      '1:octal mode:'
+      '*: :->files'
+    )
+    ;;
   gnu)
     args+=(
       '(-v --verbose -c --changes)'{-c,--changes}'[report changes made]'