3 ms·
You can directly create named directories with `hash -d`. Eg. hash -d dev=~/dev hash -d personal=~/dev/thorstenhans ... Nothing else is needed.
by eikenberry 6y ago
You can directly create named directories with `hash -d`. Eg.
hash -d dev=~/dev
hash -d personal=~/dev/thorstenhans
...
Nothing else is needed.
- donatj 6y agoI'd argue environmental variables have the strong advantage in that you can use them in cases that won't otherwise expand, namely programs that take a path parameter immediately following an equals, e.g. $ docker run --workdir=$dev foo in these cases `--workdir=~dev` is not expanded and fails as docker does not understand your alias.
- eikenberry 6y agoTrue and I often have both. I like my exported environment variables to be all caps and my directory aliases to be lowercase. This keeps their uses separate.