textastic.plugin.zsh 378 B

1234567891011121314151617
  1. #
  2. # If the tt command is called without an argument, launch Textastic
  3. # If tt is passed a directory, cd to it and open it in Textastic
  4. # If tt is passed a file, open it in Textastic
  5. #
  6. function tt() {
  7. if [[ -z $1 ]]
  8. then
  9. open -a "textastic.app"
  10. else
  11. open -a "textastic.app" $1
  12. if [[ -d $1 ]]
  13. then
  14. cd $1
  15. fi
  16. fi
  17. }