Fixed it

I am using iTerm on OSX. A nice alternative to the Terminal application delivered as part of the OS. well I use both happily anyway.

I fell of this script called ‘it’ at Mac OS X Hints, which I am using constantly. iTerm has been upgraded on several occasions since and I still use ‘it’.

At some point I cleaned up my bookmarks listing and to my surprise, ‘it’ was still showing old bookmarks. After brief googling I found out that the resource file had changed it’s name from: iTerm.plist to: net.sourceforge.iTerm.plist.

So I changed the script a little and it worked again, check it out if you are using iTerm.

  1. #!/bin/bash
  2. #http://www.macosxhints.com/article.php?story=20070409141256538
  3. arg=$1;
  4. if [[$#” = “0” ]]; then
  5. echo “Usage: ‘it bookmarkname’ or ‘it list’” && exit 1
  6. elif [[ “$1” = “list” ]]; then
  7. defaults read ~/Library/Preferences/net.sourceforge.iTerm|grep Name|awk{$1=“”;$2=“”; print $0}|tr -d ‘;’
  8. else
  9. osascript <<ENDSCRIPT
  10. on run argv
  11.   tell application “iTerm”
  12.   activate
  13.   tell the current terminal
  14.   launch session “$1”
  15.   end tell
  16.   end tell
  17. end run
  18. ENDSCRIPT
  19. fi
Leave a comment

1 Comments.

  1. George Nachman

    Check out iTerm2. The resource is now com.googlecode.iterm2.plist

Leave a Reply


[ Ctrl + Enter ]