Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Ignore commands if autocomplete to directory is possible
- X-seq: zsh-users 18768
- From: Prateek Agarwal <prat0318@xxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Ignore commands if autocomplete to directory is possible
- Date: Thu, 24 Apr 2014 22:41:13 -0500
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
I am an old loyal user of ZSH but this is my first community mail. Pardon
me for any errors.
I am using setopt auto_cd. But when autocompleting for directories, i want
that first preference is to be given to directories than to commands. Which
means, if directory is present that matches the substring then zsh should
not search for commands.
For examples, if i type 'ex' and then press <tab> and an 'examples'
directory was present it should get autocompleted. If 'examples' directory
is not there, then it should options for 'exit' 'exec' etc commands. This
would make cd'ing to directories much more faster.
There should be some neat zstyle completion for this, but i am not able to
figure that out. Closest related thread was : disable substring match on
command name <http://www.zsh.org/mla/users/2014/msg00279.html>. But it was
hard for me to tweak it to my needs.
Is there some good completion style possible for this?
PS: My completion zstyle is currently using oh-my-zsh's
completion.zsh<https://github.com/robbyrussell/oh-my-zsh/blob/master/lib/completion.zsh>
Thanks.
--
Prateek Agarwal
MSCS, UT Austin
Messages sorted by:
Reverse Date,
Date,
Thread,
Author