Skip to content

Commit 2711c3e

Browse files
author
Matt Turner
committed
Merge remote-tracking branch 'fitztrev/master'
2 parents ce7044c + 924561b commit 2711c3e

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

Shuttle/AppDelegate.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,11 @@ - (NSDictionary*) parseSSHConfigFile {
158158

159159
if ([first isEqualToString:@"Host"]) {
160160
// a new host section
161-
key = second;
161+
162+
// split multiple aliases on space and only save the first
163+
NSArray* hostAliases = [second componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
164+
hostAliases = [hostAliases filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"SELF != ''"]];
165+
key = [hostAliases firstObject];
162166
servers[key] = [[NSMutableDictionary alloc] init];
163167
}
164168
}
Binary file not shown.

apple-scripts/iTermStable/iTerm-stable-new-tab-default.applescript

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ end scriptRun
1616
on CommandRun(withCmd, withTheme, theTitle)
1717
tell application "iTerm"
1818
if it is running then
19-
tell the current terminal
19+
set curTerm to (current terminal)
20+
try
21+
set tmp to curTerm
22+
on error
23+
set curTerm to (make new terminal)
24+
end try
25+
tell curTerm
2026
set newSession to (launch session withTheme)
2127
tell the last session
2228
reopen
@@ -41,4 +47,4 @@ on CommandRun(withCmd, withTheme, theTitle)
4147
end tell
4248
end if
4349
end tell
44-
end CommandRun
50+
end CommandRun

0 commit comments

Comments
 (0)