about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2007-09-27 11:47:23 +0000
committerClint Adams <clint@users.sourceforge.net>2007-09-27 11:47:23 +0000
commit453ba566097aeb6b4ea811f02858a06dc5549fd7 (patch)
tree690f1ce57964a9c1623080db332c95a07ae2817e
parentcdf6b4840c33c81f83e7f19e9c0ac68f0f893f99 (diff)
downloadzsh-453ba566097aeb6b4ea811f02858a06dc5549fd7.tar.gz
zsh-453ba566097aeb6b4ea811f02858a06dc5549fd7.tar.xz
zsh-453ba566097aeb6b4ea811f02858a06dc5549fd7.zip
23814: fixes for Darwin.
-rw-r--r--ChangeLog7
-rw-r--r--Completion/BSD/Command/_chflags2
-rw-r--r--Completion/Unix/Command/_comm24
-rw-r--r--Completion/Unix/Command/_ls9
-rw-r--r--Completion/Unix/Type/_file_systems4
5 files changed, 36 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 64e72e1a6..47ca4d181 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
-2007-09-25  Clint Adams  <clint@zsh.org>
+2007-09-27  Clint Adams  <clint@zsh.org>
+
+	* Jun Takimoto: 23814: Completion/Unix/Command/_ls, Command/_ls,
+	Completion/BSD/Command/_chflags,
+	Completion/Unix/Type/_file_systems, Completion/Unix/Command/_comm:
+	fixes for Darwin.
 
 	* 23841: Completion/Unix/Command/_git: complete tag hashes for git
 	verify-tag.
diff --git a/Completion/BSD/Command/_chflags b/Completion/BSD/Command/_chflags
index d6bcfe4b3..6d5b6e973 100644
--- a/Completion/BSD/Command/_chflags
+++ b/Completion/BSD/Command/_chflags
@@ -25,7 +25,7 @@ if (( ! EUID )); then
   unset own
 fi
 
-if [[ $OSTYPE = (freebsd|dragonfly)* ]]; then
+if [[ $OSTYPE = (freebsd|dragonfly|darwin)* ]]; then
   flags=( $flags[@]
     '(nouunlnk)uunlnk[set the user undeletable flag]'
     '(uunlnk)nouunlnk[unset the user undeletable flag]'
diff --git a/Completion/Unix/Command/_comm b/Completion/Unix/Command/_comm
index c55378420..e90c317f6 100644
--- a/Completion/Unix/Command/_comm
+++ b/Completion/Unix/Command/_comm
@@ -1,10 +1,20 @@
 #compdef comm
 
-_arguments -s \
-  '-1[suppress lines unique to FILE1]' \
-  '-2[suppress lines unique to FILE2]' \
-  '-3[suppress lines that appear in both files]' \
-  '--help' \
-  '--version' \
-  '1:file1 to compare:_files' \
+local -a args
+
+args=(
+  '-1[suppress lines unique to FILE1]'
+  '-2[suppress lines unique to FILE2]'
+  '-3[suppress lines that appear in both files]'
+  '1:file1 to compare:_files'
   '2:file2 to compare:_files'
+)
+
+if _pick_variant gnu=GNU unix --version; then
+  args+=(
+    '(- : *)--version[display version information]'
+    '(- : *)--help[display help information]'
+  )
+fi
+
+_arguments -s $args
diff --git a/Completion/Unix/Command/_ls b/Completion/Unix/Command/_ls
index e5ef1fe03..7680f9273 100644
--- a/Completion/Unix/Command/_ls
+++ b/Completion/Unix/Command/_ls
@@ -5,7 +5,7 @@ local arguments is_gnu
 
 _pick_variant -r is_gnu gnu=gnu unix --help
 
-if [[ "$OSTYPE" = (netbsd*|freebsd*|openbsd*) && "$is_gnu" != gnu ]]; then
+if [[ "$OSTYPE" = (netbsd*|freebsd*|openbsd*|darwin*) && "$is_gnu" != gnu ]]; then
   arguments=(
     '(-A)-a[list entries starting with .]'
     '(-a)-A[list all except . and ..]'
@@ -54,6 +54,13 @@ if [[ "$OSTYPE" = (netbsd*|freebsd*|openbsd*) && "$is_gnu" != gnu ]]; then
 
     '*:files:_files'
   )
+  if [[ "$OSTYPE" = (freebsd*|darwin*) ]]; then
+    arguments+=(
+      '-G[enable colorized output]'
+      '-H[follow symlinks on the command line]'
+      '-P[do not follow symlinks]'
+    )
+  fi
 else
   arguments=(
     '(--all -a -A --almost-all)'{--all,-a}'[list entries starting with .]'
diff --git a/Completion/Unix/Type/_file_systems b/Completion/Unix/Type/_file_systems
index ffbf5ac68..fd75e2fa5 100644
--- a/Completion/Unix/Type/_file_systems
+++ b/Completion/Unix/Type/_file_systems
@@ -20,6 +20,10 @@ case $OSTYPE in
     fss=( cd9660 devfs ext2fs fdesc kernfs linprocfs mfs msdos nfs 
           ntfs null nwfs portal procfs std udf ufs umap union )
   ;;
+  darwin*)
+    fss=( afp cd9660 cddafs devfs fdesc hfs lfs msdos nfs
+          ntfs smbfs synthfs udf ufs volfs webdav )
+  ;;
   *)
     # default for all other systems
     fss=( ufs )