Feature request: Add a confirm dialog before resetting terminal screen
I've just accidentally resetted my output when I wanted to click on Search but accidentally clicked on Reset in the context menu.
Would you be so kind as to add a confirm dialog before resetting the terminal?
As xterm also has a Reset menu entry, unguarded function but better separated in the menu, would it be sufficient to add another separator line between Search and Reset?
I don't know, I can be awfully quick with clicking :-/
Released 3.6.2.
Thank you very much!
Add the following line or modify the KeyFunctions setting in your .minttyrc file if you'd like to restore the previous Alt+F8 hotkey behavior (reset the terminal with no confirmation dialog). See the mintty manpage for more information.
KeyFunctions=A+F8:reset-noask
Adding KeyFunctions=A+F8:reset-noask just disables resetting the terminal screen, how I can really get the original behaviour?
It was quite annoying to get this changed by default...
(apparently deleted) I'm sorry, a change is really rare but I thought the argument was quite convincing. Open to discussion though. (Note: Another change that I considered but didn't do was to enable Control as a Compose key be default...)
The KeyFunctions assignment works here, puzzled about that; does Control+V Alt+F8 report anything? Please upload your full config file.
I think is fine no worries, I thought I broke something because I got that message. But it seems like an easy fix, though it seems to not work for me...
this my config now
Font=SF Mono
FontHeight=15
FontWeight=400
FontIsBold=no
BellType=0
BellTaskbar=no
ConfirmExit=no
CursorType=block
ClipShortcuts=yes
CopyOnSelect=no
CopyAsRTF=no
TrimSelection=no
ClearSelectionOnInput=no
CursorColour=255,180,116
BackgroundColour=44,70,97
ForegroundColour=255,255,255
Black=0,0,0
BoldBlack=126,126,127
Red=255,101,80
BoldRed=241,94,75
Green=115,255,186
BoldGreen=108,243,178
Yellow=255,160,81
BoldYellow=242,152,77
Blue=94,203,255
BoldBlue=92,192,243
Magenta=235,176,255
BoldMagenta=255,168,243
Cyan=163,221,254
BoldCyan=156,208,243
White=255,255,255
BoldWhite=255,255,255
That config does not contain a KeyFunctions setting, so it cannot work.
Ah sorry, I forgot to say that when I add KeyFunctions=A+F8:reset-noask is when it stops working.
Without that line I get the confirmation message, with that line nothing happens
So Alt+F8 does not clear your screen? I have no idea why.
It clears the screen if I don't add the KeyFunctions=A+F8:reset-noask but then I get the dialog confirmation
Did you, by any chance, manage to put a Windows lineend (CRLF) behind that line?
Try to add a semicolon to its end:
KeyFunctions=A+F8:reset-noask;
Does the semicolon help?
Is there any chance we can revert this or make the default to be no confirm and otherwise provide an option for people who want that type of thing? I find myself using the "reset terminal" feature quite a bit and it's a bit jarring to flip expected behavior just because one person made a non-fatal mistake once. And yeah, I could just use the keyboard shortcut, which I'm slowly reversing muscle memory for, but it's more about the principle of adding interactivity to something that just simply does not need it and slows people down 99% of the time for the 1% odd case.
Please don't revert, but I'm totally okay with the default being not to ask and it being a config or UI setting :-)
Yes, I think it's fine to offer a UI option - but IMO to immediately slap a safety guard on something because 0.1% of the userbase shot themselves in the foot with it isn't the right approach. That's turtles all the way down.
It's a safety net for 99% of the users who did not mean to invoke a terminal reset, and for which it is likely to make no difference. But in most cases, we never want a reset to occur without confirmation, otherwise it could be used by malicious code. If someone clicks or presses enter without thinking or reading, that is not our issue, nor if someone wants to allow code to reset their terminal indiscriminately: not a safe approach!
This is about a GUI dialog option asking for confirm - not about "malicious code" resetting the terminal, of which I'm pretty sure the added confirm dialog isn't even involved with. It's a safety net optimizing for a scenario where a user clicks "Reset Terminal" in a specific context menu that they pulled up and 0.1% of the time that not actually being what they wanted to do - where the "negative" cost of that happening is merely that their scrollback buffer was cleared - a completely non-destructive situation. Meanwhile the majority of people who intentionally use it to clear scrollback buffers now have to mindlessly grab the mouse and click on a newly added confirm dialog that in the grand scheme of things is likely costing people more time than it's saving them from.
You people should cool down, the current tone is very unfriendly...
Clear scrollback is also available as a separate menu item, by the way. I do intend to add an option, surprisingly it's just a bit tricky due to the way this is implemented in mintty. Design issues: Should there be separate configuration (bits) for Alt+F8 and Ctrl+Shift+R? What should be the default?
Release 3.6.5.