Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _expand completer and hashed dirs
- X-seq: zsh-users 14416
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: _expand completer and hashed dirs
- Date: Mon, 21 Sep 2009 16:10:00 +0200
- In-reply-to: <237967ef0909210654i62d97df7nff45ad96c408db2@xxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20090921134728.GA10174@xxxxxxxxxxxxxxx> <237967ef0909210654i62d97df7nff45ad96c408db2@xxxxxxxxxxxxxx>
Mikael Magnusson <mikachu@xxxxxxxxx>:
> 2009/9/21 Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>:
[...]
> > 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.
[...]
>
> You could try putting _expand after _complete, but maybe you won't
I tried that. While that cures the ~vim<tab> problem, it stops
variables from being expanded, like:
% print $HISTSIZE<tab>
% print 9999
Also, the compsys(1) manual advises one to use _expand before
_complete, for full pleasure. :)
> like what it does with other constructs then. (I'm guessing you
> rebound ^I to complete-word rather than expand-or-complete). If that
Yes, I did that.
> doesn't do what you want, I think you'd have to use two different
> keybinds for completing and expanding.
>
> ie something like
[...]
> zle -C most-recent-file menu-complete _generic
> bindkey "^N" most-recent-file
>
> but not _files and another name for the completer would probably make sense :).
I do have similar bindings. But that's not what I'm looking for.
If there's no other way around it, I'll probably learn to use
'~vi<tab>' instead of '~vim<tab>'. :)
Regards, Frank
Messages sorted by:
Reverse Date,
Date,
Thread,
Author