Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How to get faster completion if I make zsh assume what I've typed so far is correct?
- X-seq: zsh-users 7352
- 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: Wed, 14 Apr 2004 23:52:20 -0400
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <4073DAE5.6040904@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <12734.1080061609@xxxxxxx> <4061027C.907@xxxxxxx> <4073DAE5.6040904@xxxxxxx>
paxunix wrote:
[ 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
directories:
dir1
dir1~
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 became:
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:
ls ~/.<TAB>
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.
--
Shawn Halpenny
Messages sorted by:
Reverse Date,
Date,
Thread,
Author