Skip to content
SEO & Data Specialist | Arthur Camberlein
TwitterFRBlog FR

VSCode from the CLI on MacOS

CLI, Terminal1 min read

Like a lot of people, I am now using VS Code as my main editor on Mac OS. And I try to automate my tasks as much as possible, so I create aliases in my Terminal (yes, not something new, but you got the context), including one for VSCoce aka code.

Terminal C...LI - Arthur Camberlein

Did you also got an error doing code .?

I am using zsh so my aliases should be in ~/.zshrc but I had an issue and code . was not opening VS Code but giving me an error like this one zsh: command not found: code

The solution: changing the alias for VS Code

I found the solution on Stackoverflow (here for the curious).

What helped me was:

  1. Going to VSCode
  2. Use the ⇧ + ⌘ + P to open the Command Palette
  3. Select Uninstall 'code' command from PATH
  4. Instaling it again thanks to Install 'code' command from PATH
© 2023 by SEO & Data Specialist | Arthur Camberlein. All rights reserved.
Theme by LekoArts