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)
?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Depending on your shell, you can set a
cdpathwith directories you regularly cd to, and so you can do just what you want:from anywhere. See here for more details.
Alternatively you can just set a shell variable and
Again, your shell will determine whether you can tab-complete this (I know
zshwill do this. I’m not sure aboutbash).