Skip to content

Instantly share code, notes, and snippets.

@nshtg
Forked from cmalard/subl
Created September 29, 2017 13:49
Show Gist options
  • Save nshtg/2534ad389942b7d4a2c2320e6b398eca to your computer and use it in GitHub Desktop.
Save nshtg/2534ad389942b7d4a2c2320e6b398eca to your computer and use it in GitHub Desktop.
Cygwin + Sublime Text 3 : works with files and Git
#!/bin/bash
# To create in [.babun/]cygwin/usr/local/bin/subl with chmod +x
ARGS=""
while test $# -gt 0
do
ARGS="$ARGS ${1#/cygdrive/[a-zA-Z]}"; # Remove /cygdrive and disk letter from the path
shift
done
/cygdrive/c/Program\ Files/Sublime\ Text\ 3/subl.exe $ARGS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment