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: Explore how to handle sub-shells #141343

Closed
Tyriar opened this issue Jan 25, 2022 · 3 comments
Closed

Shell integration: Explore how to handle sub-shells #141343

Tyriar opened this issue Jan 25, 2022 · 3 comments
Assignees
Labels
feature-request Request for new features or functionality on-testplan terminal-shell-integration Shell integration infrastructure, command decorations, etc.
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Jan 25, 2022

I don't think we would be able to support sub-shells without a manual shell integration installation. Perhaps this should be an option for advanced users to be cwd/command aware even in sub-shells? There are other implications to this like knowing when the sub-shell starts and ends if we want to track the "tree". This would probably involve spelling out the shell ID (or SHLVL?) on every command.

@Tyriar Tyriar added feature-request Request for new features or functionality terminal-shell-integration Shell integration infrastructure, command decorations, etc. labels Jan 25, 2022
@Tyriar Tyriar added this to the Backlog milestone Jan 25, 2022
@Tyriar
Copy link
Member Author

Tyriar commented Mar 23, 2022

We may get away with not bothering with a shell ID and instead of treating the buffer as a tree of commands, just compromise as a flat list where running a command to run a subshell is just treated as a single line. We definitely do need some way of differentiating machines though, other terminals use OSC 7 and include the hostname.

Some discussion in #145610 (comment)

@Tyriar
Copy link
Member Author

Tyriar commented Jun 3, 2022

The current thinking here is to document how to inject the script manually on the website to solve this more advanced case. The goal being users get a nice out of the box experience when shell integration is enabled and if users miss shell integration in sub-shells they can do the advanced setup which I don't think is possible without touching people's scripts which we'd rather not do.

@Tyriar
Copy link
Member Author

Tyriar commented Jun 21, 2022

Closing in favor of #151933 and microsoft/vscode-docs#5219 as manual install is the approach we'll recommend for sub-shell in the docs.

@Tyriar Tyriar closed this as completed Jun 21, 2022
@Tyriar Tyriar modified the milestones: Backlog, June 2022 Jun 21, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Aug 6, 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 on-testplan terminal-shell-integration Shell integration infrastructure, command decorations, etc.
Projects
None yet
Development

No branches or pull requests

2 participants