Zsh Mailing List Archive
Messages sorted by:
Is _oldlist breaking something it shouldn't?
- X-seq: zsh-workers 32380
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Is _oldlist breaking something it shouldn't?
- Date: Wed, 12 Feb 2014 22:32:23 -0800
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:email@example.com>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
This is less interesting than I first thought, because I didn't catch the
no_automenu interaction the first time around, but since I already typed
most of it ...
On Feb 12, 9:47pm, Bart Schaefer wrote:
} The first time you press TAB, if the result is ambiguous (in your
} example, four possible results) a completion listing and the cursor
} is moved to the first disambiguating location.
I've verified by repeated experiment that this is the default behavior
of compsys in emacs mode if you load it with no styles and the default
I've also verified that it works this way if you add a simple completer
zstyle ':completion:*' completer _complete
And that it continues to work this way if you "unsetopt automenu".
} If you hit TAB again, the same completion that created the listing
} is repeated in order to populate the menu. If you were to replay it
} in slow motion, you'd see the cursor return to the end of the word
} before the completion is begun, and then jump back to the point of
} disambiguation to insert the first choice from the menu.
As expected, this only works with automenu set. However, the cursor
remains at the disambiguation point when TAB is pressed again.
Here comes the "is this a bug?" ...
} The _oldlist completer takes explicit advantage of this behavior to
} avoid calling all the other completers when a list has already been
If I change that completer style to:
zstyle ':completion:*' completer _oldlist _complete
Now the cursor returns to the end of the word on the second TAB. Why
should _oldlist have that side-effect? Why does it have that side-effect
only when automenu is turned off?
Messages sorted by: