I use gnome-terminal for most of my hacking. In fact, I use it so much, that I’ll often have multiple tabs open for a particular project. Here’s my workflow:
- Control+Alt+t (My shortcut to open a new gnome-terminal window.)
cd ~/code/some_cool_hack/ # directory of some cool hack
- Control-Shift-t (Shortcut to open a new gnome-terminal tab.)
- Hack, hack, hack…
The problem is that the new tab that I’ve created will have a $PWD of
~, instead of keeping the $PWD of
~/code/some_cool_hack/, which is the project I’m working on!
The solution is to add:
# including this ensures that new gnome-terminal tabs keep the parent `pwd` ! if [ -e /etc/profile.d/vte.sh ]; then . /etc/profile.d/vte.sh fi
~/.bashrc. Now everything works perfectly!
One side note: this used to be the default, but for some reason it broke around Fedora 19 or 20. Maybe it had to do with my fancy prompt, but everything is working great now.