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 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.

--
Phil Hudson                  http://hudson-it.no-ip.biz
@UWascalWabbit                 PGP/GnuPG ID: 0x887DCA63


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