Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on run argv
- -- last argument should be the window title
- set windowtitle to item (the count of argv) of argv as text
- -- all but last argument go into CLI parameters
- set cliargs to ""
- repeat with arg in items 1 thru -2 of argv
- set cliargs to cliargs & " " & arg as text
- end repeat
- tell application "iTerm"
- activate
- tell current window
- set newTab to (create tab with default profile)
- tell the current session of newTab
- set name to windowtitle
- write text cliargs
- end tell
- end tell
- end tell
- end run
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement