Open the ~/.bashrc file using vi or Vim:
vi ~/.bashrc Enter the following by pressing i to insert:
code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;} Save and exit the file using Esc + :wq
Reflect the settings in ~/.bashrc using the following command:
source ~/.bashrc