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 7331
- From: Thorsten Kampe <thorsten@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: How to get faster completion if I make zsh assume what I've typed so far is correct?
- Date: Wed, 7 Apr 2004 13:41:08 +0200
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <12734.1080061609@xxxxxxx> <4061027C.907@xxxxxxx> <4073DAE5.6040904@xxxxxxx>
- Sender: news <news@xxxxxxxxxxxxx>
* paxunix (2004-04-07 12:41 +0100)
> I wrote:
>> Peter Stephenson wrote:
>>>>Why does zsh have to glob every directory along a pathname in order to
>>>>find completions within the final directory? For example, take this case:
>>>>If I set -x, the output after hitting TAB shows zsh retrieves all the
>>>>subdirectories within one, two, three and four.
>>>It's looking for /oneandabit/twoandabit/threeandabit/four... etc.
>>>I certainly agree it should be possible to turn this off but the
>>>function that implements this is very hairy and full of calls to poorly
>>>documented shell internals.
>>>The documentation in the zshcompsys manual page suggests setting
>>> zstyle ':completion:*:paths' accept-exact true
>>>or maybe (I'm not quite sure what the entry means and the implementation
>>> zstyle ':completion:*:paths' accept-exact '*'
>> The latter works perfectly. The situation is even more pronounced on
>> zsh under Cygwin, where completing a path with
>> /cygdrive/<drive-letter> will cause your floppy drive to be accessed
>> every time you attempt a new completion. The accept-exact '*'
>> resolves this issue wonderfully. Many thanks!
> 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.
That's why it's called "accept-exact", right?
> For example, if you have two directories:
> 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.
> In case there is a style or option that is messing things up, here is my
> zstyle ':completion:*:paths' accept-exact '*'
> and my setopt output:
Try "zstyle ':completion:*:paths' accept-exact continue"
Messages sorted by: