zsh-users
 help / color / mirror / code / Atom feed
* Ignore commands if autocomplete to directory is possible
@ 2014-04-25  3:41 Prateek Agarwal
  2014-04-25  8:01 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Prateek Agarwal @ 2014-04-25  3:41 UTC (permalink / raw)
  To: zsh-users

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

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

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

end of thread, other threads:[~2014-04-25  8:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-25  3:41 Ignore commands if autocomplete to directory is possible Prateek Agarwal
2014-04-25  8:01 ` Bart Schaefer

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).