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 |
Visual code has a new way to add code into your PATH env, if you're not already using code as a command for other thing ....
⌘ + SHIFT + P (mac) or ALT+SHIFT+P (windows/linux);ENTER;This should add code command into your PATH
This would be closer to the way it works in BASH and ZSH:
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.