You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature-requestRequest for new features or functionalityhelp wantedIssues identified as good community contribution opportunitieson-testplanterminalGeneral terminal issues that don't fall under another label
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.
Reacted by Robin Munn, Vidhyadharan Deivamani, Grzegorz Dziadkiewicz, Evan Digby, Rahul, sfertman, Roberto Huertas, Vivek Venkatesh , Shiran Ginige, Stillward and 16 more
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.
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:
Reacted by ◢◤◢◤, Diablohu, Alex Ford, Ashley Matthews, sfreeman422, sparkietm and Vasyl Vavrychuk
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.
Reacted by Alex Ford and nelsonec87
Reacted by Tyler Malone, Pablo Torre and Mofesola Banjo
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)"
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.
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.
Going by the suggestions made, I believe there are two points this RFE should consider.
[Default Mode] The dropdown should always display last command run (truncated). Hovering over the dropdown can display the full text.
[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.
In addition to the context menu (which I still think is a bit unusual) I was thinking of a design similar to this experience
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.
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.
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?
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"
feature-requestRequest for new features or functionalityhelp wantedIssues identified as good community contribution opportunitieson-testplanterminalGeneral terminal issues that don't fall under another label
Activity
Tyriar commentedon Aug 2, 2016
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.
stevencl commentedon Aug 2, 2016
I would expect it would be optional. Just a quick thought but could you right click on the dropdown and choose a rename command?
JostCrow commentedon Aug 4, 2016
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:

stevencl commentedon Aug 4, 2016
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.
JostCrow commentedon Aug 4, 2016
For me it is mainly to distinguish the different terminals. So for me personally showing the last ran command is also fine.
Tyriar commentedon Aug 4, 2016
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)"
evandigby commentedon Aug 5, 2016
For UX I would like:
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.
evandigby commentedon Aug 5, 2016
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.
rjoshi31 commentedon Aug 8, 2016
Going by the suggestions made, I believe there are two points this RFE should consider.
Much needed!
stevencl commentedon Aug 8, 2016
In addition to the context menu (which I still think is a bit unusual) I was thinking of a design similar to this experience
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.
Tyriar commentedon Aug 8, 2016
Steven Clarke (@stevencl) I was speaking with Brad Gashler (@bgashler1) the other day about custom dropdowns for the panel
xicon 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.
11 remaining items
jammerware commentedon May 31, 2017
Hey Daniel Imms (@Tyriar), I'm taking a look at this one. I've modified the
TerminalInstanceto support renaming, defined a newActioninterminalActionsto 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!
Tyriar commentedon May 31, 2017
Ben Stein (@jammerware) the command
workbench.action.terminal.renameshould 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#L136Initial work on microsoft#10023.
Tyriar commentedon Jun 12, 2017
Should land in Insiders tomorrow thanks to Ben Stein (@jammerware) 👍 #28464
luisca-dev commentedon Jul 4, 2017
waiting for this feature in the stable version
zephrxx commentedon Jul 12, 2017
Can it use the console caption as the default session name?
Tyriar commentedon Jul 12, 2017
zephrxx (@zephrxx) what's the console caption?
zephrxx commentedon Jul 12, 2017
By caption I mean the highlighted part in the screen shot below.

Tyriar commentedon Jul 12, 2017
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:
thiagoufg commentedon Nov 1, 2017
Just press CTRL+SHIFT+P, then type TERMINAL RENAME, enter a name and press ENTER. :-D