Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Better Use of dirs,popd?
- X-seq: zsh-users 14842
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Better Use of dirs,popd?
- Date: Sat, 20 Feb 2010 09:31:48 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=ROSL+XEcJqjL16EdVhRP4DPZ0tlPaf9g7U8apxu9ii0=; b=Fv67PNCgTEf8FG3sBW5jn+pUoNUBmeZD6fB9FadvYXHDhVHzVpooYpZZjdR7KnZyD2 gFeq/lULjQh9Q8eRVW26870FqWcjPxR46CIPpioPYXZIWgZMIi+tzFmBjKpeJdnHLuY1 iLPJf+8OmfM3zvaEBdvQg8N6LSSr5ed+sp7kg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=EZ9+LrL+Xa24X+VpvZpWxgTBiUyLcRoUXT7KKL2LGKV/1K1dU9jFjLkfQngYlW0GYd DzTlGkk6YYCmR3ZaRFmiy0MckgNmVHQHLnSbnizTucwQf31ZMkMnGgKSPZYFs8LLTJ4z 53Uka4uLWOmCDQR8jk3YR4rS6r1DcLHwpMJtQ=
- In-reply-to: <20100220011345.GA7924@xxxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <Xns9D255D054E22zzappergmailcom@xxxxxxxxxxxx> <20100220011345.GA7924@xxxxxxxxxxxxxxx>
On 20 February 2010 02:13, Geoff Wing <gcw@xxxxxxx> wrote:
> On Saturday 2010-02-20 00:34 +0000, zzapper output:
> :Hi
> :It's annoying that if I do a
> :> dirs -v
> :I can list my recent directories but cannot cd to a particular one.
> :I guess a nifty bit of scripting could do the job.
> :any ideas other than a clunky
> :dirs -v | gp '^13' | sed etc etc
>
> % dirs -v
> 0 /
> 1 /tmp
> 2 /home
> 3 /staff
> % pwd
> /
> % cd ~3
> % pwd
> /staff
> % cd ~2
> % pwd
> /home
> %
If you use cd -<num> instead, you can even tabcomplete at the - and
see the stack. You can use a + instead of a - to reverse the numbers
too.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author