sublime.plugin.zsh 800 B

1234567891011121314151617181920212223242526272829
  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. break
  21. fi
  22. done
  23. fi
  24. alias stt='st .'