sudo
sudo copied to clipboard
"Open in new window" needs an option to hold the window open
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.
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
.
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.
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.
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.