zsh-users
 help / color / mirror / code / Atom feed
* Decreasing needed TABs for completion
@ 2021-09-30 14:09 Gürkan
  2021-09-30 14:49 ` Eric Cook
  0 siblings, 1 reply; 2+ messages in thread
From: Gürkan @ 2021-09-30 14:09 UTC (permalink / raw)
  To: zsh-users

Hi,

When using tab completion on app-parameter (e.g. not for "cd"), I'd
like to automatically "prefer" directories if possible.

It's kinda hard for me to explain, so please consider following tree:

a/
  something.py  # <-- a file
  something/     # <-- a directory
    something_else.py ...

When I do "vim a/so<tab>", buffer becomes "vim a/something".
On second <tab>, it shows "something.py" and "something/" as valid
options (without changing buffer).
On third <tab> it selects first one, but doesn't remove the suggestions.
That is the level (on 3rd <tab>) I'd like to land with first <tab> if possible.

Is there a way to achieve this?

Thanks,
-- 
Gürkan


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Decreasing needed TABs for completion
  2021-09-30 14:09 Decreasing needed TABs for completion Gürkan
@ 2021-09-30 14:49 ` Eric Cook
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Cook @ 2021-09-30 14:49 UTC (permalink / raw)
  To: zsh-users

On 9/30/21 10:09, Gürkan wrote:
> Hi,
>
> When using tab completion on app-parameter (e.g. not for "cd"), I'd
> like to automatically "prefer" directories if possible.
>
> It's kinda hard for me to explain, so please consider following tree:
>
> a/
>    something.py  # <-- a file
>    something/     # <-- a directory
>      something_else.py ...
>
> When I do "vim a/so<tab>", buffer becomes "vim a/something".
> On second <tab>, it shows "something.py" and "something/" as valid
> options (without changing buffer).
> On third <tab> it selects first one, but doesn't remove the suggestions.
> That is the level (on 3rd <tab>) I'd like to land with first <tab> if possible.
>
> Is there a way to achieve this?
>
> Thanks,
>

zstyle ':completion:*' list-dirs-first true
setopt menucomplete


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-30 14:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-30 14:09 Decreasing needed TABs for completion Gürkan
2021-09-30 14:49 ` Eric Cook

Code repositories for project(s) associated with this 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).