2012-04-19 07:14:55 +00:00
|
|
|
# Sublime Text 2 Aliases
|
2012-05-24 15:33:19 +00:00
|
|
|
|
2013-04-07 13:12:30 +00:00
|
|
|
local _sublime_darwin_paths > /dev/null 2>&1
|
2013-02-09 07:00:41 +00:00
|
|
|
_sublime_darwin_paths=(
|
2013-11-16 23:03:16 +00:00
|
|
|
"/usr/local/bin/subl"
|
2014-03-02 08:59:27 +00:00
|
|
|
"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
|
2013-11-16 23:03:16 +00:00
|
|
|
"/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl"
|
|
|
|
"/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
|
2014-03-02 08:59:27 +00:00
|
|
|
"$HOME/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
|
|
|
|
"$HOME/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl"
|
|
|
|
"$HOME/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
|
2013-02-09 07:00:41 +00:00
|
|
|
)
|
2012-07-29 04:53:20 +00:00
|
|
|
|
2012-05-24 15:33:19 +00:00
|
|
|
if [[ $('uname') == 'Linux' ]]; then
|
2014-03-02 08:59:27 +00:00
|
|
|
if [ -f '/opt/sublime_text/sublime_text' ]; then
|
|
|
|
st_run() { /opt/sublime_text/sublime_text $@ &| }
|
2013-11-16 23:03:16 +00:00
|
|
|
else
|
2014-03-02 08:59:27 +00:00
|
|
|
st_run() { /usr/bin/sublime-text $@ &| }
|
2013-11-16 23:03:16 +00:00
|
|
|
fi
|
|
|
|
alias st=st_run
|
2013-02-09 07:00:41 +00:00
|
|
|
|
2012-05-24 15:33:19 +00:00
|
|
|
elif [[ $('uname') == 'Darwin' ]]; then
|
2013-02-09 07:00:41 +00:00
|
|
|
|
2013-11-16 23:03:16 +00:00
|
|
|
for _sublime_path in $_sublime_darwin_paths; do
|
|
|
|
if [[ -a $_sublime_path ]]; then
|
|
|
|
alias subl="'$_sublime_path'"
|
|
|
|
alias st=subl
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
2012-05-21 14:42:12 +00:00
|
|
|
fi
|
2013-02-09 07:00:41 +00:00
|
|
|
|
2012-04-19 07:14:55 +00:00
|
|
|
alias stt='st .'
|