D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Command-line: jump to arbitrary parent dir from deeply nested dir (bash)

 

On Tue, 3 Sep 2013, Philip Hudson wrote:

On 2 Sep, 2013, at 4:47 pm, Simon Avery wrote:

On 2 September 2013 14:23, Philip Hudson <phil.hudson@xxxxxxxxx> wrote:

alias up        'cd `pwd | sed \'s|\(.*/\!:1/\).*|\1|\'`'

complete up    'p@*@`pwd|tr \'/\' \' \'`@'


Surely that would be better aliased "back"?

"up" is simply "cd .." - at least for me.

Ah-ha! But then, I wouldn't have scared another tcsh user out of the closet. You see what I did there?

But seriously... yes, you're right, that is the default alias assigned to 'up'. What can I say? I use '..', not 'up', for that. 'back' might indeed be semantically better.

Curiously enough it doesn't work for me.

gordon @ yakko: alias up        'cd `pwd | sed \'s|\(.*/\!:1/\).*|\1|\'`'
Unmatched `.

default alias? Are there? I guess I've been using the same .cshrc for the past 20+ years, so might have missed that.

I have cd.. alaised to cd ..

Gordon

--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq