OhmNomNom / thyme

A fork of mintty, for the modern world
GNU General Public License v3.0
0 stars 0 forks source link

Close-on-Enter when --hold is used #256

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
According to 0.9.5's changelog:
"When keeping the window open after the command is finished, the cursor is 
switched off and the window has to be closed with the Close button or Alt+F4, 
rather than just any key."

I understand that this change is for avoiding the possibility of closing 
windows accidentally, but instead of complete disable of this feature, if it's 
possible to change "close-on-any-key" with "close-on-enter".

This feature was helpful for scripts because it was a fast way to know that 
there isn't any background process running, anything in script is finished and 
the exit status is 0.

Thanks

Original issue reported on code.google.com by dxdemetr...@gmail.com on 29 Mar 2011 at 12:22

GoogleCodeExporter commented 9 years ago
I forgot to ask (in issue 255): what's actually wrong with closing the window 
with Alt+F4 or the Close button?

Original comment by andy.koppe on 29 Mar 2011 at 6:26

GoogleCodeExporter commented 9 years ago
It's nothing wrong, it just for speeding things up (at least for me).
I'm using unattended scripts with cygwin and when I have to do many tasks at 
the same time it's faster for me (at least when I testing them) to press just a 
key instead of pressing ALT+F4 and if it's not finished yet to have to press 
cancel for all closing confirmations.

Before of this change I knew that when I was pressing some key and the window 
was closing that everything is succeeded and finished.
After of this change I have to press ALT+F4 (or X button), and if something 
goes wrong I have to press cancel for all confirmation.

Another reason is the problem I had before of mintty ver. 0.9.1:
"Alt+F4 prompts for exit confirmation if the shell has any child processes, as 
already happens with the close button. (There's an option for disabling this.)"

ALT+F4 and X button is something related by microsoft's windows (if I'm 
correct) and I'm afraid that something could be wrong some time in the future 
because of some window update or something else.

Original comment by dxdemetr...@gmail.com on 29 Mar 2011 at 7:37

GoogleCodeExporter commented 9 years ago
Thanks for explaining.

Original comment by andy.koppe on 30 Mar 2011 at 6:04

GoogleCodeExporter commented 9 years ago
Implemented in r1149 on trunk.

Original comment by andy.koppe on 30 Mar 2011 at 11:27

GoogleCodeExporter commented 9 years ago

Original comment by andy.koppe on 17 Apr 2011 at 10:47

GoogleCodeExporter commented 9 years ago
Thanks for this enhancement, that's exactly what I asked for.
I used "sleep 10 & exit" command to check it out.
-With "ALT+F4" & "X", mintty is closing but "sleep" command is still working.
-With "ENTER" or "ESC", mintty is waiting for "sleep" command to finish.
That's what I meant in some parts of comment 2.

Original comment by dxdemetr...@gmail.com on 18 Apr 2011 at 8:15

GoogleCodeExporter commented 9 years ago
Yep, mintty stays open until no more process is connected to it (or to be 
precise: until mintty gets an EOF from its underlying pseudo terminal device), 
in case there's more output from any such process. The 'setsid' command can be 
used to invoke a process without having it connected to the terminal.

Original comment by andy.koppe on 18 Apr 2011 at 8:30