DEV Community

Almatin Siswanto
Almatin Siswanto

Posted on

Add Visual Studio Code to your OSX zsh PATH

After installing Visual Studio Code, it will not automatically be added to your terminal path, so you will need to add it manually. here is how.

Open your terminal and run this command in your terminal

cat << EOF >> ~/.zprofile
# Add Visual Studio Code (code)
export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
EOF
Enter fullscreen mode Exit fullscreen mode

Restart your terminal, and you should now be able to open Visual Studio Code directly from your terminal using this command

% code .
This will open the current folder in your Visual Studio Code. That’s it!

Resources:

Visual Studio Code for Mac

Top comments (0)