Mehmet Noyan Aydin
Mehmet Noyan Aydin

Reputation: 289

Mac OSX code . command does not work

First of all happy new year to all, I am trying to set Visual Studio Code to start from terminal and using the instructions from VS Code site but editing ~/.bash_profile or ~/.profile file with following command does not work out.

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

So what could be the problem?

Thank you in advance,

Upvotes: 0

Views: 5742

Answers (3)

Anushri Patel
Anushri Patel

Reputation: 21

just paste following command to terminal and return. no need to close terminal or restart

source ~/.bash_profile

Upvotes: 2

Wade Anderson
Wade Anderson

Reputation: 2519

You need to refresh your bash_profile after making changes.

. ~/.bash_profile

Upvotes: 2

Mehmet Noyan Aydin
Mehmet Noyan Aydin

Reputation: 289

Solved the problem. After editing the bash_profile. We need to reset the machine to make changes effective

Upvotes: 0

Related Questions