Skip to content

Commit

Permalink
fix iTerm integration
Browse files Browse the repository at this point in the history
it broke because of a change in the scripting bridge. the added mandatory 'newline' parameter.
  • Loading branch information
muhqu committed Aug 28, 2015
1 parent 3fa37b6 commit 4b36131
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Term Window/DTTermWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@ - (IBAction)executeCommandInTerminal:(id) __unused sender {
iTerm = [SBApplication applicationWithBundleIdentifier:@"com.googlecode.iterm2"];

// test for iTerms newer scripting bridge
if(iTerm && [iTerm respondsToSelector:@selector(createWindowWithDefaultProfileCommand:)]) {
iTermTerminal *terminal = nil;
iTermSession *session = nil;
if(iTerm && [iTerm respondsToSelector:@selector(quitSaving:)]) {
iTerm2NightlyWindow *terminal = nil;
iTerm2NightlySession *session = nil;

if([iTerm isRunning]) {
[iTerm createWindowWithDefaultProfileCommand:nil];
Expand All @@ -244,11 +244,11 @@ - (IBAction)executeCommandInTerminal:(id) __unused sender {
session = [terminal valueForKey:@"currentSession"];

// write text "cd ~/whatever"
[session writeContentsOfFile:nil text:cdCommandString];
[session writeContentsOfFile:nil text:cdCommandString newline:true];

// write text "thecommand"
if ([self.command length] > 0) {
[session writeContentsOfFile:nil text:self.command];
[session writeContentsOfFile:nil text:self.command newline:true];
}

[iTerm activate];
Expand Down

0 comments on commit 4b36131

Please # to comment.