sublime.plugin.zsh 800 Bytes
Newer Older
Dylan Hudson's avatar
Dylan Hudson committed
1
# Sublime Text 2 Aliases
2

3
local _sublime_darwin_paths > /dev/null 2>&1
4
5
6
7
8
9
_sublime_darwin_paths=(
	"$HOME/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
	"$HOME/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
	"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
	"/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
)
10

11
if [[ $('uname') == 'Linux' ]]; then
12
	if [ -f '/usr/bin/sublime_text' ]; then
13
		st_run() { nohup /usr/bin/sublime_text $@ > /dev/null & }
14
	else
15
		st_run() { nohup /usr/bin/sublime-text $@ > /dev/null & }
16
	fi
17
18
	alias st=st_run

19
elif  [[ $('uname') == 'Darwin' ]]; then
20
21
22
23

	for _sublime_path in $_sublime_darwin_paths; do
		if [[ -a $_sublime_path ]]; then
			alias st="'$_sublime_path'"
24
			break
25
26
		fi
	done
27
fi
28

Dylan Hudson's avatar
Dylan Hudson committed
29
alias stt='st .'