sublime.plugin.zsh 791 B

12345678910111213141516171819202122232425262728
  1. # Sublime Text 2 Aliases
  2. local _sublime_darwin_paths > /dev/null 2>&1
  3. _sublime_darwin_paths=(
  4. "$HOME/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
  5. "$HOME/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
  6. "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
  7. "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
  8. )
  9. if [[ $('uname') == 'Linux' ]]; then
  10. if [ -f '/usr/bin/sublime_text' ]; then
  11. st_run() { nohup /usr/bin/sublime_text $@ > /dev/null & }
  12. else
  13. st_run() { nohup /usr/bin/sublime-text $@ > /dev/null & }
  14. fi
  15. alias st=st_run
  16. elif [[ $('uname') == 'Darwin' ]]; then
  17. for _sublime_path in $_sublime_darwin_paths; do
  18. if [[ -a $_sublime_path ]]; then
  19. alias st="'$_sublime_path'"
  20. fi
  21. done
  22. fi
  23. alias stt='st .'