Commit 156fa5fa authored by Robby Russell's avatar Robby Russell
Browse files

Merge pull request #4396 from TylerCharlesworth/patch-1

Adds Cygwin support to Sublime
parents 4b902d75 07f08aa7
# Sublime Text 2 Aliases
if [[ $('uname') == 'Linux' ]]; then
local _sublime_linux_paths > /dev/null 2>&1
_sublime_linux_paths=(
......@@ -33,7 +31,6 @@ elif [[ "$OSTYPE" = darwin* ]]; then
"$HOME/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl"
"$HOME/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
)
for _sublime_path in $_sublime_darwin_paths; do
if [[ -a $_sublime_path ]]; then
subl () { "$_sublime_path" $* }
......@@ -43,4 +40,18 @@ elif [[ "$OSTYPE" = darwin* ]]; then
done
fi
elif [[ "$OSTYPE" = 'cygwin' ]]; then
local _sublime_cygwin_paths > /dev/null 2>&1
_sublime_cygwin_paths=(
"$(cygpath $ProgramW6432/Sublime\ Text\ 2)/sublime_text.exe"
"$(cygpath $ProgramW6432/Sublime\ Text\ 3)/sublime_text.exe"
)
for _sublime_path in $_sublime_cygwin_paths; do
if [[ -a $_sublime_path ]]; then
subl () { "$_sublime_path" $* }
alias st=subl
break
fi
done
alias stt='st .'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment