From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8700 invoked from network); 13 Aug 2002 21:08:32 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 13 Aug 2002 21:08:32 -0000 Received: (qmail 438 invoked by alias); 13 Aug 2002 21:08:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17542 Received: (qmail 398 invoked from network); 13 Aug 2002 21:08:23 -0000 Date: Tue, 13 Aug 2002 17:07:51 -0400 Mime-Version: 1.0 (Apple Message framework v543) Content-Type: text/plain; delsp=yes; charset=US-ASCII; format=flowed Subject: zsh umount completion bug for most platforms, #533679 From: Thomas Stromberg To: zsh-workers@sunsite.dk Content-Transfer-Encoding: 7bit Message-Id: X-Mailer: Apple Mail (2.543) 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 Senior UNIX Administrator, Bell & Howell cell/sms: 919-272-3094 "downtime is for amateurs".