From 6f859c5837753a87544b2672678e36bcf167cc82 Mon Sep 17 00:00:00 2001 From: Varun Vijayaraghavan Date: Mon, 21 May 2012 10:42:12 -0400 Subject: [PATCH 1/2] Add Sublime Text 2 alias for Linux. Detects the platform using "uname", and sets the alias accordingly. If you are using Linux, this assumes that you have created a symbolic link to /usr/bin/sublime_text. --- plugins/sublime/sublime.plugin.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh index c42c68df1..6825d6c08 100644 --- a/plugins/sublime/sublime.plugin.zsh +++ b/plugins/sublime/sublime.plugin.zsh @@ -1,3 +1,8 @@ # Sublime Text 2 Aliases -alias st='/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl' +#unamestr = 'uname' +if [[ uname == 'Linux' ]]; then + alias st='open -a /usr/bin/sublime_text' +elif [[ uname == 'Darwin' ]]; then + alias st='open -a "/Applications/Sublime Text 2.app' +fi alias stt='st .' From 8923694fb42393d063487203e803199b394bbb47 Mon Sep 17 00:00:00 2001 From: Varun Vijayaraghavan Date: Thu, 24 May 2012 11:33:19 -0400 Subject: [PATCH 2/2] Fixed a bug in checking the platform --- plugins/sublime/sublime.plugin.zsh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) mode change 100644 => 100755 plugins/sublime/sublime.plugin.zsh diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh old mode 100644 new mode 100755 index 6825d6c08..0035b1b26 --- a/plugins/sublime/sublime.plugin.zsh +++ b/plugins/sublime/sublime.plugin.zsh @@ -1,8 +1,9 @@ # Sublime Text 2 Aliases #unamestr = 'uname' -if [[ uname == 'Linux' ]]; then - alias st='open -a /usr/bin/sublime_text' -elif [[ uname == 'Darwin' ]]; then - alias st='open -a "/Applications/Sublime Text 2.app' + +if [[ $('uname') == 'Linux' ]]; then + alias st='/usr/bin/sublime_text&' +elif [[ $('uname') == 'Darwin' ]]; then + alias st='open -a /Applications/Sublime Text 2.app' fi alias stt='st .'