Skip to content

Integrated Terminal : Allow Renaming sessions #10023

Closed

Description

@geevi

Please add a feature to rename sessions in the integrated terminal.
Usually one opens multiple terminal sessions using the same command like ssh. Then all these sessions are called ssh in the dropdown. Please allow to rename the session, so that its easy to choose.

Activity

  1. added
    feature-request
    terminal
    on Aug 1, 2016
  2. added this to the Backlog milestone on Aug 1, 2016
  3. Tyriar commented on Aug 2, 2016

    @Tyriar
    Contributor

    Steven Clarke (@stevencl) Brad Gashler (@bgashler1) thoughts on this from UX side? I was thinking something like this would be quite cumbersome as you would have to do it whenever you launch a new terminal instance.

  4. stevencl commented on Aug 2, 2016

    @stevencl
    Member

    I would expect it would be optional. Just a quick thought but could you right click on the dropdown and choose a rename command?

  5. JostCrow commented on Aug 4, 2016

    @JostCrow

    I would like to see a new button near the dropdown. Something like my screenshot. Also a command when you are in the terminal like ctrl+shift+r or f2 would be nice.

    button example:
    screenshot from 2016-08-04 10 22 23

  6. stevencl commented on Aug 4, 2016

    @stevencl
    Member

    If the goal is to distinguish between different terminals, how about just automatically showing the last command run in each terminal? That way the user wouldn't even have to bother renaming if they just want to be bale to distinguish between multiple terminals (assuming that they aren't running the same command in every terminal).

    If we have to expose an action, right click probably isn't the best approach as it is a little unusual to right click on a drop down. Thinking of this like a regular combobox though, perhaps just single clicking inside the drop down could highlight the text which the user could then replace.

    I'm reluctant to add more buttons as that just adds weight and takes up space. I'd definitely expect that we should have some keyboard bindings for it.

  7. JostCrow commented on Aug 4, 2016

    @JostCrow

    For me it is mainly to distinguish the different terminals. So for me personally showing the last ran command is also fine.

  8. Tyriar commented on Aug 4, 2016

    @Tyriar
    Contributor

    Right clicking the terminal could also be an option, there's already a context menu there.

    Also another piece of information I feel is missing is the current number of terminals, integrating everything into the dropdown could get messy, eg. "2/3: /bin/bash (gulp watch)"

  9. evandigby commented on Aug 5, 2016

    @evandigby

    For UX I would like:

    • If you hover over session name in dropdown (or new edit box beside the dropdown or beside "TERMINAL") the mouse pointer turns to text cursor. You can select and rename the session easily
    • Key binding for a command to rename which automatically moves focus / cursor to a fully selected name so you can immediately type a new one (or modify the selection to augment the existing name).
    • In either case enter or some other key binding "saves" and returns focus and cursor to the terminal prompt

    It would also be nice if it was possible to launch terminals with a specific name to leave room for extensions which could allow you to organize and launch standard sessions. I'm not sure if this is already possible.

  10. evandigby commented on Aug 5, 2016

    @evandigby

    With the "last run command" option would you display the full command line or just the command?

    Particularly when using Go, there are good reasons to have multiple terminals using the same "command" since many Go tools start with "go" ("go build", "go test", "go tool pprof", etc...). I'll often have an active profiling session open in one terminal while running builds / tests in another session. Unfortunately they're both the same "command" ("go").

    I would say displaying the last run command is useful, but doesn't satisfy the same requirements as explicitly allowing renaming sessions. I would treat it as separate feature request to this one.

  11. rjoshi31 commented on Aug 8, 2016

    @rjoshi31

    Going by the suggestions made, I believe there are two points this RFE should consider.

    1. [Default Mode] The dropdown should always display last command run (truncated). Hovering over the dropdown can display the full text.
    2. [Custom Mode] In case the user wants a custom name, they can right click the dropdown to make inline edits. Thereafter, the new input will be set as the default for that terminal.

    Much needed!

  12. stevencl commented on Aug 8, 2016

    @stevencl
    Member

    In addition to the context menu (which I still think is a bit unusual) I was thinking of a design similar to this experience

    dropdown

    With the addition that I wouldn't make the text area editable by default. Perhaps guard against undesired edits by making the user click inside the area once to position a cursor at the end.

    Another alternative design is that there is an <Rename...> entry at the bottom of the dropdown. If the user chooses this, they see a dialog box that displays the list of terminals. The user can select one, press a rename button, then type in the new name. It's quite cumbersome compared to the others but it puts the functionality out of the way meaning that people will be much less likely to rename a terminal.

  13. Tyriar commented on Aug 8, 2016

    @Tyriar
    Contributor

    Steven Clarke (@stevencl) I was speaking with Brad Gashler (@bgashler1) the other day about custom dropdowns for the panel x icon discussion. I don't think we do custom dropdowns currently which would be necessary for something like this, custom dropdowns are a decent chunk of effort to get right (fitting in with each OS, ensuring accessibility, etc.).

    This also may not work if we want to put buttons inside the dropdown? Something to consider.

  14. 11 remaining items

  15. jammerware commented on May 31, 2017

    @jammerware

    Hey Daniel Imms (@Tyriar), I'm taking a look at this one. I've modified the TerminalInstance to support renaming, defined a new Action in terminalActions to expose it, and (I think) done the de-registration of the terminal process message handler for title changes. Do I also need to figure out how to present the UI for the user to enter the name of the terminal, or is the intent that I just PR this stuff and you guys work that out?

    Thanks much!

  16. Tyriar commented on May 31, 2017

    @Tyriar
    Contributor

    Ben Stein (@jammerware) the command workbench.action.terminal.rename should present a quick open that lets the user enter the new name. To do that I think you want to use this https://github.com/Microsoft/vscode/blob/f1a8632778e4574cf07b3cb162aa998e4a51aebc/src/vs/platform/quickOpen/common/quickOpen.ts#L136

  17. Tyriar commented on Jun 12, 2017

    @Tyriar
    Contributor

    Should land in Insiders tomorrow thanks to Ben Stein (@jammerware) 👍 #28464

  18. luisca-dev commented on Jul 4, 2017

    @luisca-dev

    waiting for this feature in the stable version

  19. zephrxx commented on Jul 12, 2017

    @zephrxx

    Can it use the console caption as the default session name?

  20. Tyriar commented on Jul 12, 2017

    @Tyriar
    Contributor

    zephrxx (@zephrxx) what's the console caption?

  21. zephrxx commented on Jul 12, 2017

    @zephrxx

    By caption I mean the highlighted part in the screen shot below.
    capture

  22. Tyriar commented on Jul 12, 2017

    @Tyriar
    Contributor

    zephrxx ah, well I don't think we have access to that and also it would be too long for the dropdown. In #30152 we're looking into getting Windows closer to the Linux/macOS experience which shows the active program/shell:

    • If you launch powershell it will say "powershell"
    • If you launch cmd inside powershell, it will say "cmd"
    • If you launch npm install inside powershell, it will say "node"
  23. thiagoufg commented on Nov 1, 2017

    @thiagoufg

    Just press CTRL+SHIFT+P, then type TERMINAL RENAME, enter a name and press ENTER. :-D

  24. locked and limited conversation to collaborators on Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requesthelp wantedon-testplanterminal

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions