Skip to content

Quickly Navigate to Folder in Shell

View on Twitter

💡 Are you often navigating to the same folders in the terminal?

👉🏼 Add the folders as variables in your source file and type:

➡️ cd $myproject

instead of:

➡️ cd /Users/maxim/Code/myproject

Enable using variables with cd in Z Shell with: setopt cdablevars and in Bash with: shopt -s cdable_vars. Then run export yourapp="path/to/yourapp" after which you can use cd $yourapp.
You might also like
Secure Your VPS: Use Non-Root User Read tip
Mapping of HTTP Status Messages in Node.js Read tip
Secure Your VPS: Enable Automatic Updates Read tip