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