Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Better Use of dirs,popd?
- X-seq: zsh-users 14843
- From: zzapper <david@xxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Better Use of dirs,popd?
- Date: Sat, 20 Feb 2010 09:47:44 +0000 (UTC)
- 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
- Organization: SuccessTheory
- References: <Xns9D255D054E22zzappergmailcom@xxxxxxxxxxxx> <20100220011345.GA7924@xxxxxxxxxxxxxxx> <237967ef1002200031j4c679aceof170dd814d93b756@xxxxxxxxxxxxxx>
- Sender: news <news@xxxxxxxxxxxxx>
>> :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.
>
I'm stunned.
Is this zsh only?
--
zzapper
http://zzapper.co.uk/ Technical Tips
Messages sorted by:
Reverse Date,
Date,
Thread,
Author