Put this in your config.fish
run
code path/to/project
function code | |
set location "$PWD/$argv" | |
open -n -b "com.microsoft.VSCode" --args $location | |
end |
This would be closer to the way it works in BASH and ZSH:
function code --wraps='/Applications/Visual Studio Code 2.app/Contents/Resources/app/bin/code' --description 'alias code /Applications/Visual Studio Code 2.app/Contents/Resources/app/bin/code'
/Applications/Visual\ Studio\ Code\ 2.app/Contents/Resources/app/bin/code $argv;
end
I used FISH's "alias" command to generate the function, and then I edited the function to add the escape characters for the spaces in the path.
if you already have an alias named 'code', like I do, I think this is a great alternative. I don't find any option to use the official launcher under a different alias