terminal vscode open code example
Example 1: open vscode in terminal sudo
sudo code --user-data-dir="~/.vscode-root"
Example 2: shortcut to open vscode from terminal
path code .
Example 3: adding code . in the terminal
code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;}