Bash CDPATH customization
I love The Bourne Again Shell; so much so, that I feel a little dirty when I grab my mouse outside of Photoshop. Admittedly and somewhat understandly, I was slow as shit at first with the terminal. The slow-lived frustration and swearing against all things Linux was worth it though, and now I can't imagine my workflow not including a terminal.
Just as the PATH variable allows you to specify paths to exectuables, CDPATH allows you to specify paths to directories. This is great if you're not a fan of manipulating the Bash directory stack and have a few directories that you want to be able to easily jump between. To make this happen, add a simple export directive to your .bash_profile...
~/.bash_profile
export CDPATH=$HOME:$HOME/python
... and then tell Bash about the update (without having to restart it)
$ . ~/.bash_profile
This is great because it allows me to quickly navigate to ~/python/django, ~/python/tkinter, etc. without needing to mess with periods, forward slashes or simply remembering where the hell I am. I simply need to type
$ django
... and after Bash realizes that 'django' isn't a child of my working directory, it will find the .bash_profile directive and voila. Laziness is good.














