bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cd multiple levels up?


From: Roman Rakus
Subject: Re: cd multiple levels up?
Date: Wed, 16 Jun 2010 13:13:07 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc11 Lightning/1.0b2pre Thunderbird/3.0.4

On 06/16/2010 01:04 PM, Clark J. Wang wrote:
On Sun, Jun 13, 2010 at 7:46 PM, Peng Yu<pengyu.ut@gmail.com>  wrote:

Hello,

I frequently need do cd multiple levels up. For example,

cd ../..
cd ../../../../

It would be convenient to type something like "cd 2" or "cd 4". Is
there a command for this?

--
Regards,
Peng

My way:
I wrote a compgen function for cd and it behaves like this: when you type
`cd .....' on the command line and then press TAB, the command line becomes
`cd ../../../../', then you can continue editing it to be `cd
../../../../other-dir/' and press ENTER.
I'm against changing the behaviour of cd. It means, when you have directory name with dots, you will not be able to cd into it. Right, not directly like `cd ....', but using `cd ./....' will probably work. I just want to let you know about it :)

RR



reply via email to

[Prev in Thread] Current Thread [Next in Thread]