diff options
author | Andrew Janke <andrew@apjanke.net> | 2015-09-28 08:52:03 -0400 |
---|---|---|
committer | Andrew Janke <andrew@apjanke.net> | 2015-09-28 08:52:03 -0400 |
commit | e4fdb083655fc582ebcecb07cd1bd1130077f0e4 (patch) | |
tree | fee07d9adfee79d1c88206ead154a23520ac51cb /plugins/sublime/sublime.plugin.zsh | |
parent | 5c8b0cc0c1782b34790548498018fb9e0300992b (diff) | |
parent | b05ef1034fffd7b0c29f1558a8a357ccce7ae74b (diff) | |
download | zsh-e4fdb083655fc582ebcecb07cd1bd1130077f0e4.tar.gz zsh-e4fdb083655fc582ebcecb07cd1bd1130077f0e4.tar.bz2 zsh-e4fdb083655fc582ebcecb07cd1bd1130077f0e4.zip |
Merge branch 'master' into copyfile-portability
Diffstat (limited to 'plugins/sublime/sublime.plugin.zsh')
-rw-r--r-- | plugins/sublime/sublime.plugin.zsh | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh index 4b93c1580..62c6df8f8 100644 --- a/plugins/sublime/sublime.plugin.zsh +++ b/plugins/sublime/sublime.plugin.zsh @@ -1,5 +1,3 @@ -# 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 .' |