about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2009-01-29 16:27:36 +0000
committerClint Adams <clint@users.sourceforge.net>2009-01-29 16:27:36 +0000
commit844b8b33d34212c10ae1290e5419ca5d463d9e89 (patch)
treef1f9bc58f95700ba0003cbc7042cc428b49e5da7 /Completion
parent8b7a0fb1040181137a068f9fc4a2686706d068a7 (diff)
downloadzsh-844b8b33d34212c10ae1290e5419ca5d463d9e89.tar.gz
zsh-844b8b33d34212c10ae1290e5419ca5d463d9e89.tar.xz
zsh-844b8b33d34212c10ae1290e5419ca5d463d9e89.zip
26483: Completion/Unix/Command/_getfacl, Completion/Unix/Command/_setfacl: handle SGI's acl programs as well as Cygwin's.
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/_getfacl19
-rw-r--r--Completion/Unix/Command/_setfacl23
2 files changed, 40 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_getfacl b/Completion/Unix/Command/_getfacl
index 6c3b9f261..0c6e6cedf 100644
--- a/Completion/Unix/Command/_getfacl
+++ b/Completion/Unix/Command/_getfacl
@@ -1,7 +1,7 @@
 #compdef getfacl getfacl.exe
 
+if _pick_variant cygwin=cygwin unix --version; then
 # cygwin 1.5.25
-
 _arguments -s -S \
   '(--all -a)'{-a,--all}'[display the filename, owner, group, and ACL of the file]' \
   '(--dir -d)'{-d,--dir}'[display the filename, owner, group, and default ACL of the directory]' \
@@ -9,3 +9,20 @@ _arguments -s -S \
   '(- *)'{-h,--help}'[display help information]' \
   '(- *)'{-v,--version}'[display version information]' \
   '*: :_files'
+else
+_arguments -s -S \
+  '--access[display the file access control list only]' \
+  '(-d --default)'{-d,--default}'[display the default access control list only]' \
+  '--omit-header[do not display the comment header]' \
+  '--all-effective[print all effective rights]' \
+  '--no-effective[print no effective rights] '\
+  '--skip-base[skip files that only have the base entries]' \
+  '(-R --recursive)'{-R,--recursive}'[recurse into subdirectories]' \
+  '(-L --logical)'{-L,--logical}'[logical walk, follow symbolic links]' \
+  '(-P --physical)'{-P,--physical}'[physical walk, do not follow symbolic links]' \
+  '--tabular[use tabular output format]' \
+  '--numeric[print numeric user/group identifiers]' \
+  '--absolute-names[don'"'"'t strip leading '"'"'/'"'"' in pathnames' \
+  '--version[print version and exit]' \
+  '--help[this help text]'
+fi
diff --git a/Completion/Unix/Command/_setfacl b/Completion/Unix/Command/_setfacl
index c87a1d017..593c2b57a 100644
--- a/Completion/Unix/Command/_setfacl
+++ b/Completion/Unix/Command/_setfacl
@@ -1,7 +1,7 @@
 #compdef setfacl setfacl.exe
 
+if _pick_variant cygwin=cygwin unix --version; then
 # cygwin 1.5.25
-
 _arguments -s -S \
   '(-d, --delete)'{-d,--delete}'[delete one or more specified ACL entries]:ACL entry:' \
   '(-f, --file)'{-f,--file}'[set ACL entries for FILE to ACL entries read from a ACL_FILE]:ACL file:_files' \
@@ -11,3 +11,24 @@ _arguments -s -S \
   '(- *)'{-h,--help}'[output usage information and exit]' \
   '(- *)'{-v,--version}'[output version information and exit]' \
   '*: :_files'
+else
+_arguments -s -S \
+  '(-m --modify)'{-m,--modify=}'[modify the current ACL]:ACL:' \
+  '(-M --modify-file)'{-M,--modify-file=}'[read ACL entries to modify from file]:file:_files' \
+  '(-x --remove)'{-x,--remove=}'[remove ACL entries]:ACL:' \
+  '(-X --remove-file)'{-X,--remove-file=}'[read ACL entries to remove from file]:file:_files' \
+  '(-b --remove-all)'{-b,--remove-all}'[remove all extended ACL entries]' \
+  '(-k --remove-default)'{-k,--remove-default}'[remove the default ACL]' \
+  '--set=[set the ACL, replacing the current ACL]:ACL:' \
+  '--set-file=[read ACL entries to set from file]:file:_files' \
+  '--mask[do recalculate the effective rights mask]' \
+  '(-n --no-mask)'{-n,--no-mask}'[don'"'"'t recalculate the effective rights mask]' \
+  '(-d --default)'{-d,--default}'[operations apply to the default ACL]' \
+  '(-R --recursive)'{-R,--recursive}'[recurse into subdirectories]' \
+  '(-L --logical)'{-L,--logical}'[logical walk, follow symbolic links]' \
+  '(-P --physical)'{-P,--physical}'[physical walk, do not follow symbolic links]' \
+  '--restore=[restore ACLs]:file:_files' \
+  '--test[test mode (ACLs are not modified)]' \
+  '--version[print version and exit]' \
+  '--help[this help text]'
+fi