Nwafor Onyebuchi
Posted on February 11, 2024
There are so many ways to open a project in VS code. My favorite is to navigate to the project directory from my terminal and invoke VS code on the directory by simply typing code .
However, sometimes the magic wand doesn't work, especially after a new installation of VS Code. It would instead just spit out zsh: command not found: code
in the terminal. So how do you solve this?
- Open your VS code
- Press
Command + Shift + P
. This will open the command palette. - Then search for
shell command
. - Select
Install 'code' command in PATH
. You might be prompted to type in your password. That's it. - Head over to your terminal and type
code .
.
That's it! Happy coding!
💖 💪 🙅 🚩
Nwafor Onyebuchi
Posted on February 11, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.