From: Bart Schaefer <schaefer@brasslantern.com>
To: <zsh-users@zsh.org>
Cc: Silas Silva <silasdb@gmail.com>
Subject: Re: umount completion context and tags
Date: Sun, 14 Dec 2014 08:31:12 -0800 [thread overview]
Message-ID: <141214083112.ZM23551@torch.brasslantern.com> (raw)
In-Reply-To: <20141214131541.GB1489@rikku>
On Dec 14, 11:15am, Silas Silva wrote:
}
} device-labels is useless for me, so I tried to exclude it:
}
} zstyle ':completion:*:mount:*' tag-order '!device-labels'
}
} But, it simply doesn't work! ^Xh still gives me all tags.
That's not what '!' does. It doesn't remove the tags themselves from
the help output, it removes the *possible matches* for the tags when
performing an actual completion. The tag name itself is still valid.
Also, are you completing after umount? Because you used :mount: in
the zstyle name, so it's not going to apply to the umount command.
Like so (using "unsetopt alwayslastprompt" so that the listings aren't
overwritten each time I hit tab):
torch% umount
/ /dev/shm /sys
/boot /proc usbfs
/dev/hda1 /proc/bus/usb /var/lib/nfs/rpc_pipefs
/dev/hda2 /proc/sys/fs/binfmt_misc
/dev/pts sunrpc
torch% zstyle ':completion:*:umount:*' tag-order '! device-labels'
torch% umount /
Now there are no labels, only paths, so there is a unique "/" prefix
and I have to hit tab a second time to get the list:
torch% umount /
/ /dev/pts /proc/sys/fs/binfmt_misc
/boot /dev/shm /sys
/dev/hda1 /proc /var/lib/nfs/rpc_pipefs
/dev/hda2 /proc/bus/usb
torch% umount /
If you want the style for both mount and umount, you can use:
zstyle ':completion:*:(u|)mount:*' tag-order '! device-labels'
(Aside: Interesting that the listing sort order ignores the slashes. I
don't offhand know why that's the case.)
prev parent reply other threads:[~2014-12-14 16:30 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
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 [this message]
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=141214083112.ZM23551@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=silasdb@gmail.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).