You are here because you probably tried to open a file from the terminal using vscode like this:
and the response you get is that the command doesn’t exist even though you have vscode installed.
Let’s fix this by adding a new alias so that our terminal knows about this command.
No matter what you are using: zsh, bashrc or others, just edit the config file (e.g. for zsh is ~/.zshrc) and add the following line:
Alias that leads to the Visual Studio Code install path
alias code="open -a /Applications/Visual\ Studio\ Code.app"
- alias command in the config lets you define a custom command that the terminal will recognize and run the action you specify in the commas. In this case we are opening the file in vscode editor.
If you have any question, don’t hesitate to leave it in bellow comment section and we’ll help you out!
If you haven’t ever used vscode, make sure to check the official getting started articles.
Upcoming competitors arise, fleet is coming from Jetbrain.