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


Click here to return to the 'Combined script' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Combined script
Authored by: mjg on Jun 28, '07 05:54:04AM
Here's the script I used, combining all the material from above along with a couple other tricks:

#!/bin/sh

arg=$1
me=`basename $0`
if [[ "$#" = "0" ]]; then
  echo "Usage: '$me bookmarkname' or '$me list'" && exit 1
elif [[ "$1" = "list" ]]; then
  defaults read iTerm|grep Name|grep -v NSColorPicker|awk '{$1="";$2="";print $0}'|tr -d ';'
else
osascript <<ENDSCRIPT
  tell application "iTerm"
    activate
    tell the current terminal
      launch session "$1"
    end tell
  end tell
ENDSCRIPT
fi


[ Reply to This | # ]