* zsh umount completion bug for most platforms, #533679
@ 2002-08-13 21:07 Thomas Stromberg
0 siblings, 0 replies; only message in thread
From: Thomas Stromberg @ 2002-08-13 21:07 UTC (permalink / raw)
To: zsh-workers
I reported this bug some time ago, and I was suprised to see it still
exists in 4.0.5:
http://sourceforge.net/tracker/
index.php?func=detail&aid=533679&group_id=4068&atid=104068
It'd appear you guys aren't even using that bug tracker however, from
how the FAQ words things. So, I'm posting it here.
It seems that the umount completion pretty much presumes every platform
uses /etc/mtab, if they aren't FreeBSD. However, It's mostly the other
way around, unfortunately. FreeBSD, OpenBSD, NetBSD, Solaris, HP-UX,
MacOS X all do not have mtab files.
This patch against Completion/Unix/Command/_mount changes the
assumption so that IRIX & Linux use mtab, and everyone else uses the
output of the mount command. Please CC me any comments as I am not on
this list.
--- _mount~ Fri Aug 9 09:30:13 2002
+++ _mount Tue Aug 13 16:59:43 2002
@@ -748,17 +748,18 @@
local dev_tmp mp_tmp mline
case "$OSTYPE" in
- freebsd*)
+ linux*|irix*)
+ tmp=( "${(@f)$(< /etc/mtab)}" )
+ dev_tmp=( "${(@)${(@)tmp%% *}:#none}" )
+ mp_tmp=( "${(@)${(@)tmp#* }%% *}" )
+ ;;
+ *)
/sbin/mount | while read mline; do
dev_tmp=( $dev_tmp $mline[(w)1] )
mp_tmp=( $mp_tmp $mline[(w)3] )
done
;;
- *)
- tmp=( "${(@f)$(< /etc/mtab)}" )
- dev_tmp=( "${(@)${(@)tmp%% *}:#none}" )
- mp_tmp=( "${(@)${(@)tmp#* }%% *}" )
- ;;
+
esac
_alternative \
Thomas Stromberg <thomas@stromberg.org>
Senior UNIX Administrator, Bell & Howell
cell/sms: 919-272-3094
"downtime is for amateurs".
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-08-13 21:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-13 21:07 zsh umount completion bug for most platforms, #533679 Thomas Stromberg
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).