Re:Don't waste your time by cd-ing in the terminal
by anon_d on Friday February 18, 2011 @10:11PM
(#2238236)
Why not just:
There's no need for magic when you know how to shell.
[ Parent
| on HN ]
Re:Don't waste your time by cd-ing in the terminal
by fabjan on Saturday February 19, 2011 @01:43AM
(#2238622)
Why not just
shopt -s cdable_vars
nm=`pwd`/blog
cd nm
No need for hacks when you know how to shell.
Re:Don't waste your time by cd-ing in the terminal
by anon_d on Saturday February 19, 2011 @06:09AM
(#2238866)
Annoying special cases:
$ cd /
$ nm=/foo
$ ls | grep nm
$ cd nm
$ pwd
/foo
$ cd ~
$ ls | grep nm
nm
$ cd nm
$ pwd
~/nm
$ echo FFFFFUUUUUUUUU
Inflexible: $ cd nm/jan/img
cd: No such director nm/jan/img
$ echo SHIT
SHIT
$ cd $nm/jan/img
Worse, It's nonstandard and only saves you one chracter.