zsh-users
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: umount completion context and tags
Date: Sun, 14 Dec 2014 16:15:05 +0100	[thread overview]
Message-ID: <CAHYJk3T=_C8gCkt-wbX5XA++n2CXf90UyR9AV92ZEknW2dOF9A@mail.gmail.com> (raw)
In-Reply-To: <20141214131541.GB1489@rikku>

On Sun, Dec 14, 2014 at 2:15 PM, Silas Silva <silasdb@gmail.com> wrote:
> Hi there!
>
> I was trying to tweak umount completion by using the tag-order style.
> AFAIK, umount completion.  According to "umount ^Xh", we have:
>
>     tags in context :completion::complete:umount::
>         argument-rest options  (_arguments _mount (eval))
>     tags in context :completion::complete:umount:argument-rest:
>         device-labels device-paths directories  (_alternative _mount (eval))
>         device-paths                            (_canonical_paths _canonical_paths _alternative _mount (eval))
>
> It means that we have at least three tags:
>
>     device-labels
>     device-paths
>     directories
>
> 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.  Taking a
> glance at the _mount completion, it has tags above hardcoded, but I
> didn't look further.
>
> In reality, what I want is to avoid behaviour like (in Linux):
>
>     mount /dev/sdb1 /mnt/usb0
>     cd /mnt
>     umount u<Tab>
>     umount udev  (!!!)
>
> Any help?
>
> Thank you!

That's weird in at least two ways. I get the style to work only if i
make it ":completion:*". Secondly, those are filesystem types, not
labels, and are only valid after -t afaik(?), and umount -t produces a
broken completion.

-- 
Mikael Magnusson


  reply	other threads:[~2014-12-14 15:15 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 [this message]
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

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='CAHYJk3T=_C8gCkt-wbX5XA++n2CXf90UyR9AV92ZEknW2dOF9A@mail.gmail.com' \
    --to=mikachu@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).