Posted By

zingo on 07/22/08


osx cli iterm

Versions (?)

Quick new tab from iTerm

 / Published in: Bash


Place this in your ~/.bash_profile then type tab in your terminal window to see some magic happen.

  1. tab() # new tab from current dir
  2. {
  3. osascript -e "
  4. tell application \"iTerm\"
  5. tell the first terminal
  6. launch session \"Default Session\"
  7. tell the last session
  8. write text \"cd $(pwd)\"
  9. end tell
  10. end tell
  11. end tell"
  12. }

Report this snippet  

You need to login to post a comment.