2013-12-13 06:16:14 +08:00
|
|
|
function subl --description 'Open Sublime Text'
|
|
|
|
if test -d "/Applications/Sublime Text.app"
|
|
|
|
"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" $argv
|
|
|
|
else if test -d "/Applications/Sublime Text 2.app"
|
2013-08-09 01:46:15 +08:00
|
|
|
"/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" $argv
|
2014-10-29 07:05:38 +08:00
|
|
|
else if test -d "$HOME/Applications/Sublime Text.app"
|
|
|
|
eval "$HOME/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl" $argv
|
|
|
|
else if test -d "$HOME/Applications/Sublime Text 2.app"
|
|
|
|
eval "$HOME/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl" $argv
|
2013-12-12 06:59:32 +08:00
|
|
|
else if test -x "/opt/sublime_text/sublime_text"
|
|
|
|
"/opt/sublime_text/sublime_text" $argv
|
2014-08-22 01:17:44 +08:00
|
|
|
else if test -x "/opt/sublime_text_3/sublime_text"
|
|
|
|
"/opt/sublime_text_3/sublime_text" $argv
|
2013-12-08 10:51:22 +08:00
|
|
|
else
|
|
|
|
echo "No Sublime Text installation found"
|
2013-08-09 01:46:15 +08:00
|
|
|
end
|
2013-07-16 10:20:12 +08:00
|
|
|
end
|