From 47a4798218a1f646662ff6431f2281853f0a42cf Mon Sep 17 00:00:00 2001 From: Ian Chesal Date: Wed, 7 Mar 2012 17:03:55 -0500 Subject: [PATCH] First instance of the Sublime Text 2 plugin * Sets up PATH on OS X for subl access if it's not already there * Adds some handle aliases for working with ST2 from the command line More to come! --- .../sublime-text-2/sublime-text-2.plugin.zsh | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 plugins/sublime-text-2/sublime-text-2.plugin.zsh diff --git a/plugins/sublime-text-2/sublime-text-2.plugin.zsh b/plugins/sublime-text-2/sublime-text-2.plugin.zsh new file mode 100644 index 000000000..7e191dcee --- /dev/null +++ b/plugins/sublime-text-2/sublime-text-2.plugin.zsh @@ -0,0 +1,20 @@ +# sublime-text-2.plugin.zsh +# +# An oh-my-zsh plugin for Sublime Text 2 +# Primarily targetted at OS X ST2 users but this might work for +# Linux as well. +# +SUBL=`which subl` +if [[ $SUBL == 'subl not found' ]] ; then + if [[ `uname` == 'Darwin' ]] ; then + if [ -d /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin ] ; then + export PATH=/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin:${PATH} + fi + if [ -d ~/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin ] ; then + export PATH=~/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin;${PATH} + fi + fi +fi + +alias st='subl' +alias stzsh='subl ~/.zshrc' \ No newline at end of file