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

Finalize VS Code shell integration sequences in code #157571

Merged
merged 1 commit into from Aug 9, 2022

Conversation

Tyriar
Copy link
Member

@Tyriar Tyriar commented Aug 8, 2022

Part of #155639


I'll be writing on a page on the VS Code website that will be the main place for script authors to learn about shell integration in VS Code. Let me know if anyone has feedback, AFAIK the only potentially controversial thing is that we duplicate a bunch of sequences that already exist, the reasoning being:

  • OSC 633 is primarily meant to be used in scripts shipped with VS Code or VS Code extensions for zero-config shell integration. Implementing on the shell side may also happen when first class VS Code support is desired (check $TERM_PROGRAM).
  • To make everything simple and consistent within OSC 633
  • We can extend it without worrying about extending someone else's protocol
  • We can still support the other common sequences, just prioritize the OSC 633 ones (Shell integration: Prioritize OSC 633 over other protocols #157570) to help identify the ideal sequences when multiple shell integration scripts are running

The recommendation on the website will be to use OSC 633 when targeting only VS Code, and the more common sequences if possible when writing general purpose scripts. So for the case of p10k for example, its standard shell integration should work for basic command navigation support as it currently does, for full support sending the command line (OSC 633 ; E ; <CommandLine> ST) will enable command aware functionality and cwd (OSC 633 ; P ; Cwd=<cwd> ST) will enable current working directory aware functionality.

The main change here was to move to less awful serializing of the command line sequence.

cc @zadjii-msft, @andschwa, @SeeminglyScience, @pfitzseb, @romkatv, @fdncred, @zgracem

@Tyriar Tyriar added this to the August 2022 milestone Aug 8, 2022
@Tyriar Tyriar requested a review from meganrogge August 8, 2022 22:08
@Tyriar Tyriar self-assigned this Aug 8, 2022
@meganrogge meganrogge merged commit 5cf4a84 into main Aug 9, 2022
@meganrogge meganrogge deleted the tyriar/finalize_si branch August 9, 2022 02:56
joyceerhl pushed a commit that referenced this pull request Aug 10, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Sep 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants