Skip to content

Instantly share code, notes, and snippets.

@Jamamuuga
Forked from jrnewell/open.bash
Created May 12, 2016 22:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jamamuuga/265919c5437b3ae7b5b9460e9ec2f5a0 to your computer and use it in GitHub Desktop.
Save Jamamuuga/265919c5437b3ae7b5b9460e9ec2f5a0 to your computer and use it in GitHub Desktop.
Open Sublime Text in Windows Cygwin
#!/bin/bash
run-fixed-cygpath "/cygdrive/c/Windows" explorer.exe "$@"
exit $?
#!/bin/bash
run-fixed-cygpath "/cygdrive/c/Program Files/Perforce" p4merge.exe "$@"
sleep 1
exit $?
#!/bin/bash
for ((AT=3; AT <= $#; AT++))
do
IDX=$[$AT-3]
if [[ "${!AT}" != -* ]]; then
FIXED_PATH[$IDX]=\"`cygpath -wa "${!AT}"`\"
else
FIXED_PATH[$IDX]="${!AT}"
fi
done
run -p "$1" "$2" ${FIXED_PATH[*]}
exit $?
#!/bin/bash
run-fixed-cygpath "/cygdrive/c/Program Files/Sublime Text 3" sublime_text.exe "$@"
exit $?
#!/bin/bash
run -p "/cygdrive/e/cygwin64/bin" mintty.exe -i /Cygwin-Terminal.ico -e /bin/env CHERE_INVOKING=1 /bin/bash -l
exit $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment