* BUG: Autocompletion for umount doesn't handle spaces in mount points
@ 2012-05-18 7:18 David Lee
2012-05-19 18:16 ` Peter Stephenson
2012-05-21 15:54 ` Jun T.
0 siblings, 2 replies; 3+ messages in thread
From: David Lee @ 2012-05-18 7:18 UTC (permalink / raw)
To: zsh-workers
Hi ZSH workers,
Autocompletion for umount lists mount points clipped at the first space. For example, if I have "/Volumes/Media Drive" and "/Volumes/Media Disk", autocomplete for amount will only list a single "/Volumes/Media".
I've confirmed with versions 4.3.11 and 4.3.17.
--David
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: BUG: Autocompletion for umount doesn't handle spaces in mount points
2012-05-18 7:18 BUG: Autocompletion for umount doesn't handle spaces in mount points David Lee
@ 2012-05-19 18:16 ` Peter Stephenson
2012-05-21 15:54 ` Jun T.
1 sibling, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 2012-05-19 18:16 UTC (permalink / raw)
To: zsh-workers
On Fri, 18 May 2012 00:18:40 -0700
David Lee <davidomundo@gmail.com> wrote:
> Autocompletion for umount lists mount points clipped at the first
> space. For example, if I have "/Volumes/Media Drive" and
> "/Volumes/Media Disk", autocomplete for amount will only list a single
> "/Volumes/Media".
I couldn't get this in my simple experiment; the mount point I made
showed up in the list as "/tmp/router\ usb". This was with an
up-to-date shell from CVS, but I don't think this is likely to have
changed. There's apparently some other ingredient.
--
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: BUG: Autocompletion for umount doesn't handle spaces in mount points
2012-05-18 7:18 BUG: Autocompletion for umount doesn't handle spaces in mount points David Lee
2012-05-19 18:16 ` Peter Stephenson
@ 2012-05-21 15:54 ` Jun T.
1 sibling, 0 replies; 3+ messages in thread
From: Jun T. @ 2012-05-21 15:54 UTC (permalink / raw)
To: zsh-workers
On 2012/05/18, at 16:18, David Lee wrote:
> Autocompletion for umount lists mount points clipped at the first space. For example, if I have "/Volumes/Media Drive" and "/Volumes/Media Disk", autocomplete for amount will only list a single "/Volumes/Media".
I guess you are using MacOSX, and, yes, this does happen on Mac
(and maybe on other BSD's also).
The following patch may fix the problem (MacOSX only).
The patch also includes two lines of '+ freebsd*|dragonfly*|darwin*)'
to use the same completion for mount/umount options as freebsd.
I have no time to write _fs_xxxx (and devordir) for MacOSX, but
they are necessary only if you use mount command.
Index: Completion/Unix/Command/_mount
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_mount,v
retrieving revision 1.31
diff -u -r1.31 _mount
--- Completion/Unix/Command/_mount 1 Mar 2011 20:22:00 -0000 1.31
+++ Completion/Unix/Command/_mount 21 May 2012 15:37:37 -0000
@@ -690,7 +690,7 @@
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 @@
'*: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 @@
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] )
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-21 16:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-18 7:18 BUG: Autocompletion for umount doesn't handle spaces in mount points David Lee
2012-05-19 18:16 ` Peter Stephenson
2012-05-21 15:54 ` Jun T.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).