about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2012-05-22 08:58:41 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2012-05-22 08:58:41 +0000
commit7d09ec507c139a16fc4246a1c035f70584cc41ea (patch)
treeaf0eeea49c6ab1112547f137cbba2fd0f6b1e208
parentd64e62ef11fc9e37acd19d77d4927538ba755787 (diff)
downloadzsh-7d09ec507c139a16fc4246a1c035f70584cc41ea.tar.gz
zsh-7d09ec507c139a16fc4246a1c035f70584cc41ea.tar.xz
zsh-7d09ec507c139a16fc4246a1c035f70584cc41ea.zip
Jun T.: 30483: improved completion on MacOS
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_mount9
2 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 9a66118b5..c04a1e64b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2012-05-22  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
+	* Jun T.: 30483: Completion/Unix/Command/_mount: improved
+	completion on MacOS.
+
 	* Danek: 30485: Src/jobs.c: trailing garbage after signal
 	number not recognised in kill builtin.
 
@@ -16318,5 +16321,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5657 $
+* $Revision: 1.5658 $
 *****************************************************
diff --git a/Completion/Unix/Command/_mount b/Completion/Unix/Command/_mount
index 409d253ab..b48aaa236 100644
--- a/Completion/Unix/Command/_mount
+++ b/Completion/Unix/Command/_mount
@@ -690,7 +690,7 @@ if [[ "$service" = mount ]]; then
     deffs=hsfs
     typeops=-F
     ;;
-  freebsd*|dragonfly*)
+  freebsd*|dragonfly*|darwin*)
     args=( -s
       '(:)-a[mount all filesystems in fstab]'
       '-d[cause everything to be done except for the actual system call]'      
@@ -765,7 +765,7 @@ else
 	'*:dev or dir:->udevordir'
       )
     ;;
-    freebsd*|dragonfly*)
+    freebsd*|dragonfly*|darwin*)
       args=(
 	'(*)-a[unmount all mounted file systems]'
 	'-A[unmount all mounted file systems except the root]'
@@ -904,6 +904,11 @@ udevordir)
       mp_tmp+=( $mline[(w)3] )
     done
   ;;
+  darwin*)
+    tmp=( "${(@f)$(/sbin/mount)}" )
+    dev_tmp=( "${(@)${(@)tmp%% *}:#map}" )
+    mp_tmp=( "${(@)${(@)tmp#* on }%% \(*}" )
+    ;;
   *)
     /sbin/mount | while read mline; do
       mp_tmp+=( $mline[(w)1] )