Skip to content

VS Code command "code" does not persist in ZSH Terminal #11124

Answered by HwangTaehyun
JordanMcgrew asked this question in Help
Discussion options

You must be logged in to vote

Hi! @JordanMcgrew
You should add this line to ~/.zshrc

code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;}

Reload your ~/.zshrc, then code . in your project. It works!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by carlosala
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants