sudo icon indicating copy to clipboard operation
sudo copied to clipboard

"Open in new window" needs an option to hold the window open

Open alunmj opened this issue 1 year ago • 4 comments

Description of the new feature / enhancement

As shown in the video announcing the 'sudo' command, you can run "netstat -ab" to see all the listening sockets on your machine, but it'll go away as soon as it's shown you them. It'd be nice to not close the window immediately on exiting the command.

Scenario when this would be used?

Many sudo commands, for sure, will be executed to perform an action. Some, at least, will be executed to see a result. Those result-seeking sudo commands are going to be more useful if a user can read the result.

Supporting information

I tried this in a virtual machine running Insider version of Windows 11. After prompting (expected) for UAC elevation, and running the "netstat -ab" command, the window closes.

alunmj avatar Feb 14 '24 19:02 alunmj

You can do this natively in Windows Terminal by going to Profiles -> Defaults (or your preferred profile) -> Advanced and then changing the Profile termination behavior to Never close automatically.

luke-beep avatar Feb 14 '24 20:02 luke-beep

This is a really good point. It'd be nice to either have the option to keep the new window open OR by default just have it stay open and just exit on any key press.

joadoumie avatar Feb 14 '24 22:02 joadoumie

You can do this natively in Windows Terminal by going to Profiles -> Defaults (or your preferred profile) -> Advanced and then changing the Profile termination behavior to Never close automatically.

Despite that, the pwsh console window still closes when the process exits. This feature is not related to Windows Terminal at all.

AvogatoWizardWhisker avatar Mar 21 '24 09:03 AvogatoWizardWhisker

You can do this natively in Windows Terminal by going to Profiles -> Defaults (or your preferred profile) -> Advanced and then changing the Profile termination behavior to Never close automatically.

Despite that, the pwsh console window still closes when the process exits. This feature is not related to Windows Terminal at all.

That wasn't my point. It was just an enlightening observation.

luke-beep avatar Mar 21 '24 09:03 luke-beep