bbedit.plugin.zsh 420 B

123456789101112131415161718192021
  1. alias bbpb='pbpaste | bbedit --clean --view-top'
  2. alias bbd=bbdiff
  3. #
  4. # If the bb command is called without an argument, launch BBEdit
  5. # If bb is passed a directory, cd to it and open it in BBEdit
  6. # If bb is passed a file, open it in BBEdit
  7. #
  8. function bb() {
  9. if [[ -z "$1" ]]
  10. then
  11. bbedit --launch
  12. else
  13. bbedit "$1"
  14. if [[ -d "$1" ]]
  15. then
  16. cd "$1"
  17. fi
  18. fi
  19. }