Run / Open VSCode from Mac Terminal

后端 未结 16 1161
忘了有多久
忘了有多久 2020-12-07 07:01

I\'d like to run / open Visual Studio Code from the Mac OSX Terminal by running this command code .. I found instructions here:

https://code.visualstud

16条回答
  •  抹茶落季
    2020-12-07 07:32

    Somehow using Raja's approach worked for me only once, after a reboot, it seems gone. To make it persistent across Mac OS reboot, I added this line into my ~/.zshrc since I'm using zsh:

    export PATH=/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin:$PATH then

    source ~/.zshrc now, I could just do

    code .

    even after I reboot my Mac.

提交回复
热议问题