Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shell integration: Support OSC 1337 ; CurrentDir=<cwd> ST for updating cwd #157567

Closed
Tyriar opened this issue Aug 8, 2022 · 5 comments · Fixed by #157783
Closed

Shell integration: Support OSC 1337 ; CurrentDir=<cwd> ST for updating cwd #157567

Tyriar opened this issue Aug 8, 2022 · 5 comments · Fixed by #157783
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders terminal-shell-integration Shell integration, command decorations, etc. verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Aug 8, 2022

Part of #155639

We want to support other common shell integration sequences as fallbacks to the VS Code specific one (OSC 633 ; P ; Cwd=<Cwd> ST)

Code pointer:

case 'Cwd': {
// TODO: Ideally we would also support the following to supplement our own:
// - OSC 1337 ; CurrentDir=<Cwd> ST (iTerm)
// - OSC 7 ; scheme://cwd ST (Unknown origin)
// - OSC 9 ; 9 ; <cwd> ST (cmder)
this._createOrGetCwdDetection().updateCwd(value);
const commandDetection = this.capabilities.get(TerminalCapability.CommandDetection);
commandDetection?.setCwd(value);
return true;
}

@Tyriar Tyriar added help wanted Issues identified as good community contribution opportunities feature-request Request for new features or functionality terminal-shell-integration Shell integration, command decorations, etc. labels Aug 8, 2022
@Tyriar Tyriar added this to the Backlog milestone Aug 8, 2022
@Tyriar Tyriar changed the title Shell integration: Support OSC 1337 ; CurrentDir=<cwd> ST Shell integration: Support OSC 1337 ; CurrentDir=<cwd> ST for updating cwd Aug 8, 2022
@babakks
Copy link
Contributor

babakks commented Aug 10, 2022

@Tyriar I'm taking this.

@Tyriar
Copy link
Member Author

Tyriar commented Aug 10, 2022

@babakks sounds good 👍

@babakks
Copy link
Contributor

babakks commented Aug 10, 2022

@Tyriar I've just submitted the PR. You can check it anytime you want.

@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Aug 19, 2022
@rzhao271 rzhao271 modified the milestones: Backlog, August 2022 Aug 23, 2022
@rzhao271 rzhao271 added the verification-needed Verification of issue is requested label Aug 23, 2022
@connor4312
Copy link
Member

@Tyriar can you add verification steps for this?

@Tyriar
Copy link
Member Author

Tyriar commented Aug 23, 2022

  • Disable shell integration
  • Open pwsh 7+
  • Run the following:
[Console]::Write("`e]633;A`a")
[Console]::Write("`e]633;B`a")
[Console]::Write("`e]633;C`a")
[Console]::Write("`e]633;D`a")
[Console]::Write("`e]1337;CurrentDir=/home/something`a")

It should change the terminal tab's description to something.

@connor4312 connor4312 added the verified Verification succeeded label Aug 23, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Oct 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders terminal-shell-integration Shell integration, command decorations, etc. verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants