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, Gordon Henderson wrote:
On Tue, 3 Sep 2013, Philip Hudson wrote:
On 3 Sep, 2013, at 12:19 pm, Gordon Henderson wrote:

Curiously enough it doesn't work for me.

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

Interesting. Let's see, possible root causes.

my guess would be that the backslash_quote shell variable isn't set:

brwtys:~ [19] set |grep backslash_quote
brwtys:~ [20] alias up 'cd `pwd | sed \'s|\(.*/\!:1/\).*|\1|\'`'
Unmatched `.
brwtys:~ [21] set backslash_quote
brwtys:~ [22] alias up 'cd `pwd | sed \'s|\(.*/\!:1/\).*|\1|\'`'
brwtys:~ [23] complete up    'p@*@`pwd|tr \'/\' \' \'`@'
brwtys:~ [24] cd i/had/to/invent/a/path/of/any/significant/length/
brwtys:~/i/had/to/invent/a/path/of/any/significant/length [25] up a
brwtys:~/i/had/to/invent/a [26]

going back to bash for now.

that was cool, though.

-wes

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