zsh-users
 help / color / mirror / 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

zsh-users

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.vuxu.org/zsh-users

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 zsh-users zsh-users/ https://inbox.vuxu.org/zsh-users \
		zsh-users@zsh.org
	public-inbox-index zsh-users

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.users


code repositories for the project(s) associated with this inbox:

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

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git