3 ms·
Why not just: echo "export nm=`pwd`/blog"' >> ~/.profile . ~/.profile cd $nm There's no need for magic when you know how to shell.
by anon_d 16y ago
Why not just:
echo "export nm=`pwd`/blog"' >> ~/.profile
. ~/.profile
cd $nm
There's no need for magic when you know how to shell.
- fabjan 16y agoWhy not just shopt -s cdable_vars nm=`pwd`/blog cd nm No need for hacks when you know how to shell.
- anon_d 16y agoAnnoying 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.