Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Decreasing needed TABs for completion



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




Messages sorted by: Reverse Date, Date, Thread, Author