zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: umount completion context and tags
Date: Sun, 14 Dec 2014 08:53:10 -0800	[thread overview]
Message-ID: <141214085310.ZM23615@torch.brasslantern.com> (raw)
In-Reply-To: <CAHYJk3T=_C8gCkt-wbX5XA++n2CXf90UyR9AV92ZEknW2dOF9A@mail.gmail.com>

[Sticking with zsh-users for now but this maybe should move to -workers]

On Dec 14,  4:15pm, Mikael Magnusson wrote:
} Subject: Re: umount completion context and tags
}
} >     umount u<Tab>
} >     umount udev  (!!!)
} 
} That's weird in at least two ways. I get the style to work only if i
} make it ":completion:*".

See previous message about :(u|)mount: ...?

} Secondly, those are filesystem types, not labels, and are only valid
} after -t afaik(?), and umount -t produces a broken completion.

Hmm.  On the latter point, "umount -t" works for me:

torch% umount -t 
adfs         eventpollfs  iso9660      qnx4         selinuxfs    usbdevfs
autofs       ext2         minix        ramfs        sockfs       usbfs
bdev         ext3         mqueue       reiserfs     swap         vboxsf
bfs          futexfs      nodev        relayfs      sysfs        vfat
binfmt_misc  hfs          ntfs         romfs        tmpfs        vxfs
cramfs       hpfs         pipefs       rootfs       udf          xfs
devpts       hugetlbfs    proc         rpc_pipefs   ufs          xiafs

(same zsh session as my previous reply, with the '! device-labels' in
the tag-order).

In what more specific way is it broken for you?  Which branch of the
'case "$OSTYPE"' is taken in _mount on your host?

On the former point, I get:

torch% umount u<TAB>
torch% umount usbfs 

Looking at _complete_debug output, usbfs is being completed as a device
label because there are no matches to "u" for either device-paths or
directories.  The tag-order '!' style only applies when the other tags
do have possible matches.

Now, as to WHY it's being completed as a label, it's because /etc/mtab
has the line

usbfs /proc/bus/usb usbfs rw 0 0

so _mount assigns

dev_tmp=( /dev/hda2 usbfs /dev/hda1 sunrpc )

which subsquently interprets everything that doesn't start with a slash
as a device label.

-- 
Barton E. Schaefer


  reply	other threads:[~2014-12-14 16:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-14 13:15 Silas Silva
2014-12-14 15:15 ` Mikael Magnusson
2014-12-14 16:53   ` Bart Schaefer [this message]
2014-12-14 17:13     ` Mikael Magnusson
2014-12-14 17:47       ` Bart Schaefer
2014-12-14 18:51         ` Mikael Magnusson
2014-12-14 16:31 ` Bart Schaefer

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=141214085310.ZM23615@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /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).