I'm frequently using the cli (terminal) on Linux and Mac.
How can I save time by setting a variable to the current project folder instead of
cd path/to/folder/over/and/over/again
Something like
cd the-current-project
(with tab completion) ?
I'm frequently using the cli (terminal) on Linux and Mac.
How can I save time by setting a variable to the current project folder instead of
cd path/to/folder/over/and/over/again
Something like
cd the-current-project
(with tab completion) ?
Depending on your shell, you can set a cdpath
with directories you regularly cd to, and so you can do just what you want:
cd the-current-project
from anywhere. See here for more details.
Alternatively you can just set a shell variable and
cd $CURRENT_PROJECT
Again, your shell will determine whether you can tab-complete this (I know zsh
will do this. I'm not sure about bash
).