Skip to content
Snippets Groups Projects
Commit 7ead4bcd authored by George Nachman's avatar George Nachman
Browse files

Add ITERM_SESSION_ID environment variable.

parent b18d7476
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -488,8 +488,16 @@ static NSString* SESSION_ARRANGEMENT_WORKING_DIRECTORY = @"Working Directory";
[env setObject:[self encodingName] forKey:@"LC_CTYPE"];
}
 
if ([env objectForKey:PWD_ENVNAME] == nil)
if ([env objectForKey:PWD_ENVNAME] == nil) {
[env setObject:[PWD_ENVVALUE stringByExpandingTildeInPath] forKey:PWD_ENVNAME];
}
PseudoTerminal *pty = [tab_ realParentWindow];
NSString *itermId = [NSString stringWithFormat:@"w%dt%dp%d",
[pty number],
[tab_ objectCount] - 1,
[tab_ indexOfSession:self]];
[env setObject:itermId forKey:@"ITERM_SESSION_ID"];
 
[SHELL launchWithPath:path
arguments:argv
Loading
Loading
Loading
Loading
@@ -104,6 +104,7 @@ static const int MIN_SESSION_COLUMNS = 2;
- (void)setTabViewItem:(NSTabViewItem *)theTabViewItem;
- (void)previousSession;
- (void)nextSession;
- (int)indexOfSession:(PTYSession*)session;
 
- (void)setLockedSession:(PTYSession*)lockedSession;
- (PTYSession*)activeSession;
Loading
Loading
Loading
Loading
@@ -404,6 +404,11 @@ static const BOOL USE_THIN_SPLITTERS = YES;
}
}
 
- (int)indexOfSession:(PTYSession*)session
{
return [[self sessions] indexOfObject:session];
}
- (id<WindowControllerInterface>)parentWindow
{
return parentWindow_;
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment