Skip to content
Snippets Groups Projects
Commit 5cb70178 authored by Evan Krall's avatar Evan Krall
Browse files

Add CurrentDir escape code to set the current directory.

Can be set using:
$ echo -e -n "\033]50;CurrentDir=/Path/To/Directory\007"
parent 2b747623
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -546,6 +546,7 @@ typedef enum {
 
// Snapshot working directory for Trouter
- (void)logWorkingDirectoryAtLine:(long long)line;
- (void)logWorkingDirectoryAtLine:(long long)line withDirectory:(NSString *)workingDirectory;
- (NSString *)getWorkingDirectoryAtLine:(long long)line;
 
// Trouter change directory
Loading
Loading
Loading
Loading
@@ -6605,6 +6605,11 @@ static bool IsUrlChar(NSString* str)
- (void)logWorkingDirectoryAtLine:(long long)line
{
NSString *workingDirectory = [[dataSource shellTask] getWorkingDirectory];
[self logWorkingDirectoryAtLine:line withDirectory:workingDirectory];
}
- (void)logWorkingDirectoryAtLine:(long long)line withDirectory:(NSString *)workingDirectory
{
[workingDirectoryAtLines addObject:[NSArray arrayWithObjects:
[NSNumber numberWithLongLong:line],
workingDirectory,
Loading
Loading
Loading
Loading
@@ -2679,6 +2679,10 @@ static VT100TCC decode_string(unsigned char *datap,
[NSApp activateIgnoringOtherApps:YES];
[[[SCREEN display] window]makeKeyAndOrderFront:nil];
[[[SCREEN display] window]makeMainWindow];
} else if ([key isEqualToString:@"CurrentDir"]) {
long long lineNumber = [SCREEN absoluteLineNumberOfCursor];
[[[SCREEN session] TEXTVIEW] logWorkingDirectoryAtLine:lineNumber
withDirectory:value];
}
} else if (token.type == XTERMCC_SET_PALETTE) {
NSString* argument = token.u.string;
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