Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Open iTerm bookmarks from the iTerm command line' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Open iTerm bookmarks from the iTerm command line
Authored by: craigw on Apr 11, '07 12:30:12PM
Hey try this one out, now you can see a list of all your choices:
#!/bin/sh

arg=$1;
if [[ "$#" = "0" ]]; then
    echo "Usage: 'it bookmarkname' or 'it list'" && exit 1
elif [[ "$1" = "list" ]]; then
    defaults read ~/Library/Preferences/iTerm|grep Name|awk '{$1="";$2=""; print $0}'|tr -d ';'
else 
osascript <<ENDSCRIPT
on run argv
  tell application "iTerm"
    activate
    tell the first terminal
      launch session "$1"
    end tell
  end tell
end run
ENDSCRIPT
fi


[ Reply to This | # ]
better
Authored by: craigw on Apr 11, '07 01:32:26PM
you might want to change line 7:
    defaults read ~/Library/Preferences/iTerm|grep Name|grep -v NSColorPicker|awk '{$1="";$2=""; print $0}'|tr -d ';'
Cool Deal!

[ Reply to This | # ]