Created
May 4, 2019 00:11
-
-
Save lambdageek/0e4fb2d7498f91544b8f7150715d02b0 to your computer and use it in GitHub Desktop.
Visual Studio Code script for Cygwin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
if [ "z$1" == "z--help" ]; then | |
echo "vscode [FILE]" | |
echo " Starts Visual Studio Code for Windows" | |
echo " If FILE is given (as a unix path) it will be opened." | |
exit; | |
fi | |
winpath="C:\\Program Files\\Microsoft VS Code\\Code.exe" | |
progpath=`cygpath -u "$winpath"` | |
filepath= | |
if [ "z$1" != z ]; then | |
filepath=`cygpath -w "$1"` | |
fi | |
cygstart "$progpath" "$filepath" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment