zsh-users
 help / color / mirror / code / Atom feed
* directory stack expansion
@ 2007-01-18 22:48 N.J. Thomas
  2007-01-18 23:15 ` Chris Johnson
  0 siblings, 1 reply; 3+ messages in thread
From: N.J. Thomas @ 2007-01-18 22:48 UTC (permalink / raw)
  To: zsh-users

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@ayvali.org
Etiamsi occiderit me, in ipso sperabo


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-01-18 23:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-18 22:48 directory stack expansion N.J. Thomas
2007-01-18 23:15 ` Chris Johnson
2007-01-18 23:21   ` N.J. Thomas

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).