Menu

#1 Add support for iTerm.app

open
nobody
None
5
2007-09-08
2007-09-08
No

The following change opens mutt in a new iTerm tab of the current terminal.

diff -u /Volumes/MailtoMutt 0.4.1/Source/Mutt.m ./Mutt.m
--- /Volumes/MailtoMutt 0.4.1/Source/Mutt.m 2004-05-30 18:25:20.000000000 -0500
+++ ./Mutt.m 2007-09-08 13:19:55.000000000 -0500
@@ -13,7 +13,7 @@
NSDebug(@"Opening mutt with file %@", path);

/* create the source to the script */
- NSString *source = [ NSString stringWithFormat:@"tell application \"Terminal\"\nactivate\ndo script \"mutt -H '%@' \"\nend tell", path ];
+ NSString *source = [ NSString stringWithFormat:@"tell application \"iTerm\"\ntell the current terminal\nactivate current session\nlaunch session \"Default Session\"\ntell the last session\nwrite text \"mutt -H '%@'; exit;\"\nend tell\nend tell\nend tell", path ];

/* create the NSAppleScript object with the source */
# warning NSAppleScript has a leak when initializing objects

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.