Skip to content

Instantly share code, notes, and snippets.

@lichtschlag
lichtschlag / gist:9e0c3dd5a6fd60642675309f7619b01b
Created January 14, 2017 23:50 — forked from cdevroe/gist:4fb3ebf7806b39020c33
Open Visual Studio Code from Terminal
code () {
if [[ $# = 0 ]]
then
open -a "Visual Studio Code" -n
else
[[ $1 = /* ]] && F="$1" || F="$PWD/${1#./}"
open -a "Visual Studio Code" -n --args "$F"
fi
}