Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: umount completion context and tags
- X-seq: zsh-users 19528
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: <zsh-users@xxxxxxx>
- Subject: Re: umount completion context and tags
- Date: Sun, 14 Dec 2014 08:31:12 -0800
- Cc: Silas Silva <silasdb@xxxxxxxxx>
- In-reply-to: <20141214131541.GB1489@rikku>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <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.)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author