Zsh Mailing List Archive
Messages sorted by:
Re: How to get faster completion if I make zsh assume what I've typed so far is correct?
- X-seq: zsh-users 7353
- From: paxunix <paxunix@xxxxxxx>
- Subject: Re: How to get faster completion if I make zsh assume what I've typed so far is correct?
- Date: Thu, 15 Apr 2004 00:05:47 -0400
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <407E06F4.6010301@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <12734.1080061609@xxxxxxx> <4061027C.907@xxxxxxx> <4073DAE5.6040904@xxxxxxx> <407E06F4.6010301@xxxxxxx>
[ using zstyle ':completion:*:paths' accept-exact '*' to avoid
partial completion globs on directory elements ]
There are a couple of very annoying issues with this solution:
ambiguous matches are not cycled through correctly and it is
impossible to complete some pathnames. For example, if you have two
Typing dir<TAB> will complete up to 'dir1' and (in my case) show dir1
and dir1~ as possible completions. Successively hitting TAB will
never cycle through to dir1~ - a trailing '/' is inserted after dir1
and zsh lists the contents of dir1 as possible completions. It
appears that any common prefix to an initial path completion attempt
causes completion to continue inside the first directory match. If
it's between a directory and a filename with a common prefix, things
work as they are supposed to.
On a hunch, I changed the '*' to '*(N)', so my resulting zstyle line
zstyle ':completion:*:paths' accept-exact '*(N)'
and so far this seems to do precisely what I want, without the above
annoyances. I especially noticed the difference when completing
dotfiles in my home directory. Without '*(N)', try:
and notice that none of the dotfiles are given as possible
completions. Instead you get a trailing slash appended and then
non-dotfile completions from the home directory. With '*(N)', this
works as expected.
Argh--spoke too soon. I had two windows open at the same time with each
of the zstyle settings, and must have used the wrong one. My mistake.
Messages sorted by: