From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10370 invoked by alias); 14 Dec 2014 17:13:39 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19530 Received: (qmail 1047 invoked from network); 14 Dec 2014 17:13:37 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IR8l9DPOmfnpABmk8T0Pcm1dVDEx4oZMaRaPBsX2aU8=; b=uQ7vVTwyOVtRyMPLPCtug+no9AsvIAma6mJ39QfiX8472BcfZibJGxXbmg5J2j44xo gd9MrO06x4vPJ2Bd3K1t89Jqz6vmEZCC429G3JPR0z51RSmcLsXoGBTbL/eeVZJD89Gn iopD0prbgx5ZV7EbgNkNhhaEElj1U3iDyrHT9oapWFuL8bixv4g5naA8gACUIK8abjqr mlgzxc+g1++flMAa1R26XE/M0ScPobWFHOb1WKO5pMeuu2JQ7nYh6jk61ePJ9VtE9rWa cq4DkC6UhRdylYO+vXBbk7L74ldFi9yZ4ooZ6FIHlbBHBCMKfI52pLCPeI55k016gA1t ffGQ== MIME-Version: 1.0 X-Received: by 10.50.27.6 with SMTP id p6mr14480042igg.4.1418577213910; Sun, 14 Dec 2014 09:13:33 -0800 (PST) In-Reply-To: <141214085310.ZM23615@torch.brasslantern.com> References: <20141214131541.GB1489@rikku> <141214085310.ZM23615@torch.brasslantern.com> Date: Sun, 14 Dec 2014 18:13:33 +0100 Message-ID: Subject: Re: umount completion context and tags From: Mikael Magnusson To: Bart Schaefer Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 On Sun, Dec 14, 2014 at 5:53 PM, Bart Schaefer wrote: > [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 > } > 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: ...? Yeah, I somehow missed this missing u. It works fine if I add it again. > } 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: Sorry, I should have been more specific than just saying it's broken. It produces this output for me: % umount -t ---- file system type \# auto\' following mqueue to \#vfat available fuse msdos try [...] I see now that the gentoo /etc/filesystems has some lines in it with comments, and the completer doesn't remove them. How about instead of this, fss+=( ${$( On the former point, I get: > > torch% umount u > 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. Here, you can use - as the first element of tag-order as zstyle ':completion:*:umount:*' tag-order - '! device-labels' and device-labels will never be used, not even as a fallback. > 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. I'm not even sure here what a device label is meant to be. I don't suppose it's something mounted by LABEL=foo? My mount manpage mentions partition labels, filesystem labels (and I know these are only readable by root), and also 'those that are labeled "nodev"' appears. -- Mikael Magnusson