zsh-workers
 help / color / mirror / code / Atom feed
From: Thomas Stromberg <thomas@stromberg.org>
To: zsh-workers@sunsite.dk
Subject: zsh umount completion bug for most platforms, #533679
Date: Tue, 13 Aug 2002 17:07:51 -0400	[thread overview]
Message-ID: <BA56944B-AF00-11D6-8F69-00039380264A@stromberg.org> (raw)

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".


                 reply	other threads:[~2002-08-13 21:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BA56944B-AF00-11D6-8F69-00039380264A@stromberg.org \
    --to=thomas@stromberg.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).