Skip to content

Separate "user terminals" from non-user terminals #88859

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

Closed
anthonyvdotbe opened this issue Jan 17, 2020 · 4 comments
Closed

Separate "user terminals" from non-user terminals #88859

anthonyvdotbe opened this issue Jan 17, 2020 · 4 comments
Assignees
Labels
*caused-by-extension Issue identified to be caused by an extension info-needed Issue requires more information from poster

Comments

@anthonyvdotbe
Copy link

Typically I have 1 to 3 terminals that I work with. However, extensions such as PowerShell and Maven for Java also create terminals of their own.

In the case of PowerShell, 1 terminal is created, in order to provide autocompletion etc. for PowerShell files. However, I don't ever want to use that terminal for anything myself (because it doesn't work the same as a PowerShell terminal that I create myself).

In the case of Maven for Java, 1 terminal is created per Maven project. However, since each terminal is created at the time of first running a command, they mingle with "my" terminals (i.e. the ones that I explicitly created & work with).

So what I would like, is for VS Code to make a clear separation between the terminals I work with, and any other auxiliary terminals created by extensions.

There are many ways to go about this, but I propose the following:

  • the terminals are ordered as follows: [user1, user2, user3, auto3, auto2, auto1]. So when I explicitly create a terminal, it is appended to the end of the list of "user terminals". And when an extension creates a terminal, it is prepended to the list of "extension terminals" (motivation: for such terminals I always want to have the most recently created terminals closest)
  • workbench.action.terminal.focusPrevious and ...focusNext skip any non-user terminals, so that I can still easily cycle through my terminals
  • non-user terminals are read-only by default, since I seldom, if ever, want to work in a terminal that was created by an extension
@vscodebot
Copy link

vscodebot bot commented Jan 17, 2020

@Tyriar
Copy link
Member

Tyriar commented Jan 23, 2020

We can't really make a judgement about what a "user" terminal is though since extensions can create terminals that you would use just like any other (eg. https://marketplace.visualstudio.com/items?itemName=Tyriar.shell-launcher). Are extensions misbehaving by showing you these terminals? I haven't used the PS extension much and the Maven one at all, but extensions can create backgrounded terminals and only surface them in the UI when the user requests them via the TerminalOptions.hideFromUser API.

@anthonyvdotbe
Copy link
Author

With "user terminal" I mean: any terminal that I open myself. Admittedly, I hadn't thought of the kind of extensions such as your Shell launcher, which would indeed classify as user terminals as well.

They're not misbehaving per se, but they:

  • open terminals that I don't want to use
    If I understand you correctly, this can be solved by having the extensions use the TerminalOptions.hideFromUser API
  • simply append their terminals, so that they mingle with my "user terminals" over time
    Since "user terminal" isn't a usable definition, an alternative would be: having the ability to reorder terminals and/or pin them to the beginning of the list. So I guess what I'm really asking here is Tabs for integrated terminal #10546. Or even better: Use Windows Terminal as the built-in Terminal if it's installed #79211, where the Windows Terminal would be a new item in the Problems/Output/Debug console/Terminal list. So then extensions would keep using Terminal, while I'd use the Windows Terminal for all "my" terminals.

So if PowerShell/vscode-powershell#2434 is already solvable with existing API, this issue can be closed and I'll wait for tabs or Windows Terminal integration.

@Tyriar
Copy link
Member

Tyriar commented Jan 24, 2020

You can always hook up windows terminal as your "external terminal" to make launching it easier (windowsExec setting), integration with VS Code isn't as good obviously though.

Closing in favor of PowerShell/vscode-powershell#2434

@Tyriar Tyriar closed this as completed Jan 24, 2020
@Tyriar Tyriar added the *caused-by-extension Issue identified to be caused by an extension label Jan 24, 2020
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*caused-by-extension Issue identified to be caused by an extension info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants