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

Re: Turn off user dir hashing



On 22 October 2010 20:30, Eike von Seggern <eikevons@xxxxxxxx> wrote:
> Hi all,
>
> is it possible to turn of the hashing of named directories during
> completion? I'm using named directories as
>
> hash -d foo=${HOME}/bar
>
> but the completion of user directories interferes and forces me to type
> more characters as necesarry.
>
> I tried to empty the hash table (hash -d -r) and it is working. But
> during the first completion the named user directories are added to the
> table again:
>
> % hash -d -r
> % hash -d
> % cd ~<Tab>
> user
> [...]
>
> It's probably hidden somewhere in a completion widget/zstyle (I'm not
> really familiar with the nomenclature)?

zstyle ':completion:*:-tilde-:*' group-order named-directories

will complete named directories before users, and if you use tag-order
instead of group-order, it will only complete named directories (as
long as there is at least one named directory).

zstyle ':completion:*:-tilde-:*' tag-order named-directories

-- 
Mikael Magnusson



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