Skip to content

Allow TerminalOptions.cwd to be a URI or a string#64461

Merged
Tyriar merged 3 commits intomasterfrom
kieferrm/terminal-cwd
Dec 17, 2018
Merged

Allow TerminalOptions.cwd to be a URI or a string#64461
Tyriar merged 3 commits intomasterfrom
kieferrm/terminal-cwd

Conversation

@kieferrm
Copy link
Copy Markdown
Member

@kieferrm kieferrm commented Dec 5, 2018

This allows an extension to override the authority of the workspace/window when a terminal is created.

@Tyriar I'm not sure if the path needs to be treated here in any way after is has been extracted from the URI.

@kieferrm kieferrm changed the title allow terminal.cwd to be a URI Allow TerminalOptions.cwd to be a URI or a string Dec 5, 2018
@kieferrm kieferrm requested a review from Tyriar December 5, 2018 22:54
export function getCwd(shell: IShellLaunchConfig, root: Uri, customCwd: string): string {
if (shell.cwd) {
return shell.cwd;
return (typeof shell.cwd === 'object') ? shell.cwd.path : shell.cwd;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it on mac and it seems like this is the one we want.

@Tyriar Tyriar added this to the December 2018 milestone Dec 6, 2018
@Tyriar Tyriar merged commit 1de614e into master Dec 17, 2018
@Tyriar Tyriar deleted the kieferrm/terminal-cwd branch December 17, 2018 19:41
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants