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

Re: directory stack expansion



N.J. Thomas sent me the following 0.8K:

> Right now, the only way I can do this is by typing this at the prompt:
> 
>     $ cd `echo ~+1`
> 
> and then hitting tab after the second backtick. Is there a way to get
> Zsh to get to expand without the backticks?

The zshzle man page lists all the builtin widgets that zsh provides, and
the one that seems to do the trick for me is:

    expand-word (^X*) (unbound) (unbound)
        Attempt shell expansion on the current word.

Control-X followed by * (Shift-8) is bound in the emacs keymap.  That's
not exactly easy to type, but you should be able to map it to something
easier:

   bindkey '^X^D' expand-word

-- 
Chris Johnson
cjohnson@xxxxxxxxxx
http://www.cs.utk.edu/~cjohnson



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