From: "N.J. Thomas" <njt@ayvali.org>
To: zsh-users@sunsite.dk
Subject: directory stack expansion
Date: Thu, 18 Jan 2007 17:48:19 -0500 [thread overview]
Message-ID: <20070118224819.GE31068@ayvali.org> (raw)
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
next reply other threads:[~2007-01-18 22:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-18 22:48 N.J. Thomas [this message]
2007-01-18 23:15 ` Chris Johnson
2007-01-18 23:21 ` N.J. Thomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070118224819.GE31068@ayvali.org \
--to=njt@ayvali.org \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).