create file ~/.config/fish/functions/code.fish
function code
set -x VSCODE_CWD $PWD
open -n -b "com.microsoft.VSCode" --args $argv;
end
or if you are using the Insiders version:
function code
set -x VSCODE_CWD $PWD
open -n -b "com.microsoft.VSCodeInsiders" --args $argv;
end