Here is the way to deal with complex paths to cd
frequently.
mkdir ~/Links
ln -s /complexpath/there ~/Links
this will create the symbolic link
~/Links/there
To use this new Links
directory efficiently,
if your login shell is bash
just include this command in your ~/.profile
(which is used by all Bourne style shells bash
, ksh
, zsh
…):
CDPATH=~/Links:.
export CDPATH
This means that for every cd
, your shell will look within 2 directories to
find a localpathname:
~/Links
.
You won't need to restart you session to test it, just run:
. ~/.profile
which means just read my ~/.profile
.
(You won't have to put it in your ~/.bashrc
since there is no need to repeat the same variable initialization when you don't change it.)
Once you have tested it, you will be able to restart your session ;).
From now on, everytime you will want to go to there
you will have to type:
cd there
git status
. I also have some aliases in my.bash_profile
. Not exactly what you're asking for, but related.