-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Implement a keybinding to restart/reload a tab #3726
Comments
Yea, I guess I could see that being useful. Thanks for the suggestion! |
Agreed! Just want to add a concrete example: |
I mean, you could just |
I think there is no definitive answer to your question but imho a relaunch as you described it would often be good enough and with a keybinding the comfort wins :) |
Hey I'm gonna cross-link a pair of issues:
|
FWIW; I use Terminal tabs to ssh to other hosts a lot. When those ssh connections get dropped - e.g. I reboot the remote host, or there's some sort of network interruption - I keep wishing I could right-click on the tab and select a "restart" option of some sort, rather than having to close the dead tab, open a new one, then drag it to the position the old one was occupying. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I would like this for both tabs and panes. I encounter this issue with PowerShell. It will stop outputting data to the screen (unknown cause), or the remote sessions will get hosed because the temp files are deleted. Reconnecting the remote sessions don't work so restarting the shell seems to be the only fix. I also encounter this if PS or some other process inside starts consuming too much memory, or the shell becomes unresponsive due to whatever abuse I'm hurling at it. I tend to have consoles open for days, even weeks at a time, so this happens "regularly" for me. |
If anyone is interested in a quick solution, I posted in #4379 a quick hack to get this functionality working in Windows Terminal here: |
I would love to see this particular feature prioritized. It's an incredible quality of life update that would drive a huge amount of impact from the users perspective. |
Its a bit of a stretch and might not be perfect, but with #960 just merged, you could add the following action to "restart" a tab
This does what it says and closes the tab and then creates a new tab with the same settings as the last closed tab. Replace |
My usecase from #12232 (dupe of this one): "When ssh hangs in WSLv1 (usually because of network issues or after laptop sleep / hibernate), somehow it doesn't react to any Ctrl+C, Ctrl+Z. Then it's impossible to kill the ssh process, and it can take a few minutes for it to bail out by itself. Current workaround: kill the whole tab (as it's impossible to kill the current process), open a new tab Feature request: "reset a tab" command that will restart the tab (and preserve the tab's place in the tab bar). Alternative feature request: somehow detecting the current process in the bash session and providing a command to kill it, e.g. it could kill all child processes except the original bash process PID." |
My usecase: I know screen has option to exit without terminating, but being iterm user on mac, I find it more convenient to just reload the tab instead. |
The problem with this is the tab position is not restored, if tab closed is first one, the restored tab is the last one. |
In case there is only one tab left, the whole window will be closed directly, and I found that this problem can be solved by {
"command":
{
"action": "multipleActions",
"actions":
[
{
"action": "splitPane",
"size":0.1,
"split": "up",
"splitMode":"duplicate"
},
{
"action": "moveFocus",
"direction": "previous"
},
{
"action": "closePane"
}
]
},
"keys": "ctrl+r",
"name": "restart tab"
} I think this method is close to perfect, except when closing the pane, it shows the content behind the terminal, which may be a rendering engine issue. I made the newly added pane as large as possible (by setting In addition, the most important thing is that this method does not require an update to the preview version. |
I found a solution (maybe perfect?)
and set "Position of newly created tabs" to "After current tab" in Appearance |
Adds an action for immediately restarting the connection. I suspect most folks that wanted #3726 will be happy just with the <kbd>enter</kbd> solution from #14060, but this will work without having to `exit` the client. Just, relaunch whatever the commandline is. Easy peasy. Closes #3726. Obsoletes #14549
For anyone wanting to bind a key to the new {
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions": [
{
"command": "restartConnection",
"keys": "alt+shift+r"
}
]
} The JSON schema seems to think it's invalid, but it works for me. Looks like |
Description of the new feature/enhancement
ConEmu has a default binding of Win+tilde to reload/restart the current tab. This would be a useful feature to add to Windows Terminal, specifically to resolve issues whereby a fresh start of a tab is useful (eg: crashes, troubleshooting).
The text was updated successfully, but these errors were encountered: