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
It seems that uncap does not detach from the console but rather minimizes it and hides the window. This works fine on a default install using the "Windows Console Host" (built-in).
This however breaks in the new and much improved Windows Terminal[1]. In the settings of Windows Terminal in "Startup" you can change "Default Terminal Application" from "Windows Console Host" to "Windows Terminal". It is easy to reproduce by simply swapping this setting.
When using the WIndows Terminal then uncap simply minimizes the window. This means that is still remains visible in the taskbar. It is clearly not being detached as you can Ctrl-C out of the process. And if the window is closed it will terminate uncap.
This becomes even more annoying as the Window Terminal support tabs. If you start uncap then the full window minimizes with all your active tabs. It does not help using cmd /c uncap as this is determined by the terminal.
Workaround: Keep "Windows Console Host" as "Default Terminal Application".
This might not be a huge issue but I would expect uncap to detach properly[2][3][4][5] as I happens with common Unix utilities. If I understand the code corretly we are currently cheating by using ShowWindow(h, SW_HIDE);
This was observed on Microsoft Windows [Version 10.0.19045.5011] using Windows Terminal 1.21.2911.0
It seems that uncap does not detach from the console but rather minimizes it and hides the window. This works fine on a default install using the "Windows Console Host" (built-in).
This however breaks in the new and much improved Windows Terminal[1]. In the settings of Windows Terminal in "Startup" you can change "Default Terminal Application" from "Windows Console Host" to "Windows Terminal". It is easy to reproduce by simply swapping this setting.
When using the WIndows Terminal then uncap simply minimizes the window. This means that is still remains visible in the taskbar. It is clearly not being detached as you can Ctrl-C out of the process. And if the window is closed it will terminate uncap.
This becomes even more annoying as the Window Terminal support tabs. If you start uncap then the full window minimizes with all your active tabs. It does not help using
cmd /c uncap
as this is determined by the terminal.Workaround: Keep "Windows Console Host" as "Default Terminal Application".
This might not be a huge issue but I would expect uncap to detach properly[2][3][4][5] as I happens with common Unix utilities. If I understand the code corretly we are currently cheating by using
ShowWindow(h, SW_HIDE);
This was observed on Microsoft Windows [Version 10.0.19045.5011] using Windows Terminal 1.21.2911.0
[1] https://github.com/microsoft/terminal
[2] https://learn.microsoft.com/en-us/windows/console/freeconsole
[3] https://stackoverflow.com/a/47833689/3703638
[4] https://stackoverflow.com/questions/13168298/have-a-user-close-a-process-allocated-console-without-exiting-the-process
[5] https://stackoverflow.com/questions/432832/what-is-the-different-between-api-functions-allocconsole-and-attachconsole-1
The text was updated successfully, but these errors were encountered: