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

directory stack expansion



Given the following directory stack:

    $ dirs -v
    0       /etc
    1       /tmp
    3       /home/foo

I often do things like "cd ~+3", "mkdir ~+1/foo", etc.

Often times, I want to be able to expand the directory. The reason for
this is that the directory stack changes often, and "mkdir ~+1/foo"
makes sense when "~+1" has the value of /tmp, but not much sense when it
is /etc or whatever. If I recall a command from the history, "cd ~+3"
might have an entirely different meaning depending on the value of the
stack.

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?

thanks,
Thomas

-- 
N.J. Thomas
njt@xxxxxxxxxx
Etiamsi occiderit me, in ipso sperabo



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