zsh-users
 help / color / mirror / code / Atom feed
* How to expeand zsh compctl completions with same prefix (from z script)?
@ 2021-08-25  8:25 Andreas Winschu
  0 siblings, 0 replies; only message in thread
From: Andreas Winschu @ 2021-08-25  8:25 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 1209 bytes --]

Hello there ,

Can anyone help me with a `compctl` grouping autocomplete entries by prefix
behavior?

I have a zsh setup via .oh-my-zsh.
The z plugin allows to jump to last recently used directories.

When you press `z name<TAB>`  it autocompletes `name` from the list of
recently visited dirs by matching `name` against the list.

https://github.com/ohmyzsh/ohmyzsh/blob/6d5b8484ce7198161d5f617c3db9fd7d3833d48c/plugins/z/z.sh#L250

Sometimes the result contains only a single entry, when i know there should
be multiple. I have debugged the `reply` variable. This issue happens, if
all entries have the same prefix, e.g. `/path/to/dir`, containing dirs with
`name`
In this case there is only the prefix in the autocomplete menu instead of
full list of matched dirs. Hitting `<TAB> `again after expansion, triggers
a new call to `z` script complete function now with the full common prefix
instead of my search query , e.g. `/path/to/dir`

When i press <Shift+Tab> which is bound to `reverse-menu-complete`
`zsh` properly selects the last item and shows the full list.

Is there supposed to be a further keybinding to expand the common prefix
for `compctl` after it grouped all entries with a common prefix?

[-- Attachment #2: Type: text/html, Size: 1451 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-25  8:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-25  8:25 How to expeand zsh compctl completions with same prefix (from z script)? Andreas Winschu

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).