Command line ID for Visual Studio Code on OS X with CSH?

VS Code editor is good and I am looking forward to using it to learn a little more about javascript and node. JS. The installation instructions describe setting up for bash

-like shells, but I'm a savage and would like to use it with csh

. Perhaps I can hack something, but is there an obvious translation

code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* }

      

in csh

alias

?

I think that works like this:

alias code "setenv VSCODE_CWD ${PWD} && open -n -b "com.microsoft.VSCode" --args $*"

      

but I think I really need a way to make VSCODE_CWD

"local" for the alias like in the bash version.

+3


source to share


1 answer


You can also create a code

script in yours PATH

with content:



#!/bin/sh
VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $*

      

0


source







All Articles