[Top][All Lists]

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

Re: cd multiple levels up?

From: Clark J. Wang
Subject: Re: cd multiple levels up?
Date: Wed, 16 Jun 2010 19:04:00 +0800

On Sun, Jun 13, 2010 at 7:46 PM, Peng Yu <address@hidden> 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.

reply via email to

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