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

_expand completer and hashed dirs



Hey list,

Some time back I started using the _expand completer in my setup.
And so far I like it.

However, with hashed directories, I got a little problem I cannot seem
to fix. Suppose, I got the following:

hash -d vim=${HOME}/.vim

While this works fine:

    % ls ~vi<tab>
    % ls ~vim/

This doesn't:

    % ls ~vim<tab>
    - all expansions -
    /home/hawk/.vim
    - original -
    ~vim

I would much rather like to get 'ls ~vim/' out of it.
I've been playing with a number of styles, but they don't seem to
have any impact on the situation.

Here's a minimal zshrc, to reproduce what I'm seeing:

[snip]
bindkey -e
hash -d vim=${HOME}/.vim
autoload -Uz compinit
compinit
zstyle ':completion:*:descriptions' format "- %d -"
zstyle ':completion:*' group-name ''
zstyle ':completion:*' completer _expand _complete _ignored _approximate
[snap]

Does anybody have a clue as to how to cure this?

Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925



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