-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Split terminal should respect terminal options of the parent terminal #45218
Comments
Maybe another command could be added for doing this. I don't think the second terminal should always inherit the configuration of the first, if you need that you can just set those settings in your global |
It will be confusing for users if split terminal is different from what the user split. We have an extension that starts a custom terminal with custom |
@IlyaBiryukov this is as designed but I didn't think about the extension case much. For terminals launched via tasks and debugging for example the current behavior is exactly what you want; you "split" the terminal to get your standard go to terminal, rather than trying to spawn the same task or debug session again in a new terminal.
This is a pretty good idea, I'm a little worried about an extension dictating how I want to use the terminal though. What does your extension do exactly? |
Our extension kicks off a terminal that starts our process that redirects stdio to a remote endpoint. So, the terminal is "virtual" and in fact doesn't even run on the user machine. Another option for split action extensibility is to be able to provide an event handler in |
Yup. Looks good. |
Not sure if this falls under what's already discussed here, but I'd like to add a use case that prompted me to search for solutions and find this issue: I'm using the ShellLauncher extension to make it easy to launch PowerShell or WSL Bash terminals according to my needs. When I launch a WSL Bash terminal and split it, I expect to get another Bash, not a PowerShell. |
@IlyaBiryukov you don't need this change with the new design in Live Share right? |
@lostintangent do we still need split terminal to be shared too in VSLS? |
@IlyaBiryukov wouldn't #45407 be needed instead of this I mean once terminal renderers are adopted? |
Yep, #45407 should suffice in place of this one. |
Proposal: export interface TerminalOptions {
/**
* Whether terminals created by splitting this terminal will inherit these options. This is
* particularly useful for extensions that launch custom shells.
*/
splitsInheritOptions?: boolean;
} @IlyaBiryukov let me know if you really need the callback, a simple flag that passes everything on would be much simpler and lower the chance for accidental abuse. FYI @TylerLeonhardt this might be useful for PS as well, let me know if you have feedback. The only problem I see with the above is what @fabiospampinato called out in #45218 (comment), the user may not want the settings to be inherited for something like PowerShell (which is more of a preference like the |
Adding to October to discuss, it won't happen in October though. |
Related to this discussion is how |
This probably needs more discussion for the non-extension case before I bring this up in the API sync. |
@Tyriar we now use |
@IlyaBiryukov on the host side too? |
@Tyriar yes, on the host side too. |
Closing this off then, no point discussing this if you wouldn't use it. This might be refined later on when the story for non-extension split behavior is expanded upon but for now I'm not keen on letting splits inherit |
This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider. If you wonder what we are up to, please see our roadmap and issue reporting guidelines. Thanks for your understanding and happy coding! |
Issue Type: Feature Request
When our extension creates a
vscode.Terminal
and then user splits it, the new split terminal should use the same terminal options as the original one. What I see is that it does not respectshellPath
andshellArgs
invscode.TerminalOptions
used to create the original terminal. It just spawns plain Powershell for me on Windows.VS Code version: Code - Insiders 1.21.0-insider (9a04587, 2018-03-01T08:09:20.917Z)
OS version: Windows_NT x64 10.0.16299
The text was updated successfully, but these errors were encountered: