Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Run][Shell plugin] Add setting or action char to don't close command prompt after #3179

Closed
htcfreek opened this issue May 19, 2020 · 17 comments
Labels
Idea-Enhancement New feature or request on an existing product Product-PowerToys Run Improved app launch PT Run (Win+R) Window Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. Run-Plugin Things that relate with PowerToys Run's plugin interface

Comments

@htcfreek
Copy link
Collaborator

htcfreek commented May 19, 2020

Summary of the new feature/enhancement

If I execute ipconfig via PowerToys Run > ipconfig the command window close itself directly after executing. But the ipconfig output has to stay open, so that I can read them.

We need a setting and/or character to tell the shell plugin to not close the window after executing the command.

Proposed technical implementation details (optional)

Character
>> ipconfig

Setting
[ ] Don't close the shell window after executing the command

Requires #5273 to be done first.

@jyuwono jyuwono added the Product-PowerToys Run Improved app launch PT Run (Win+R) Window label May 19, 2020
@PhilTb7
Copy link

PhilTb7 commented May 19, 2020

I think 99% of the time I run a command in the shell I want to see the output. This should be default.

@htcfreek
Copy link
Collaborator Author

@jyuwono I think this should be a must have for v0.19.

@crutkas
Copy link
Member

crutkas commented May 19, 2020

while i agree, this is how run prompt works

@htcfreek
Copy link
Collaborator Author

while i agree, this is how run prompt works

Maybe we need different the two tools 'shell' and 'run'.

@crutkas crutkas added this to the v1.0 Release milestone May 19, 2020
@crutkas
Copy link
Member

crutkas commented May 19, 2020

I think the better way to view this is "we can do better than run prompt"

Start menu also executes this command correctly

@htcfreek
Copy link
Collaborator Author

Start menu also executes this command correctly

That's new for me. Didn't know that. Thank you for that tipp.

@jyuwono jyuwono added the Idea-Enhancement New feature or request on an existing product label Jun 3, 2020
@muzam1l
Copy link

muzam1l commented Aug 8, 2020

Currently, Whenever I want to see the output of a command like ipconfig, I do something like this > cmd /k ipconfig (or > cmd /c ipconfig & pause ). Also, there is an issue with commands, which take little longer to execute that they don't get executed at all (like adb connect <host> in my case, sometimes), so have to do something like this > cmd /c adb connect <host> which terminates console after completing command as supposed (current behavior doesn't wait much!). But yeah there should be a cleaner way to do these things added by default.

@micahmo
Copy link

micahmo commented Nov 12, 2020

Currently, Whenever I want to see the output of a command like ipconfig, I do something like this > cmd /k ipconfig

Yes, this is a good workaround, and a good argument for adding a special character to simulate the cmd /k part. Even if I have to type double characters (e.g., >>, as @htcfreek suggested) every time I want the shell to stay open, it's still faster than cmd /k.

Also, if there is a new setting to choose the default behavior, the alternate character should do the opposite.

For example, if I want to keep the shell open 99% of the time, like @olovsson, I'll choose the option Don't close the shell window after executing the command. Then the > character keeps it open, and the >> character closes it.

@htcfreek
Copy link
Collaborator Author

@crutkas
Should we mark this as help wanted?

@enricogior
Copy link
Contributor

I think we need to do it, since for some commands, not having this option means the command is useless when invoked from PT Run.

@alannt777 please don't downvote a community upvote.

@ghost
Copy link

ghost commented Dec 2, 2020

@enricogior I downvoted him because he used a +1 comment instead of a reaction.

@enricogior
Copy link
Contributor

@alannt777
explaining that an issue can be upvoted with a reaction is useful, downvoting it is not.

@crutkas
Copy link
Member

crutkas commented Dec 2, 2020

this really needs the plug setting UX. I think it is a good setting

@crutkas crutkas removed this from the 2020 Stability Release milestone Dec 2, 2020
@crutkas crutkas added the Run-Plugin Things that relate with PowerToys Run's plugin interface label Dec 2, 2020
@enricogior enricogior changed the title [enhancement; Run > Shell plugin] Add setting or action char to don't close comand prompt after [Run][Shell plugin] Add setting or action char to don't close command prompt after Jan 7, 2021
@htcfreek
Copy link
Collaborator Author

htcfreek commented Aug 28, 2021

@davidegiacometti
This could be implemented by a simple true/false setting "Don't close shell window". Thoughts?

Btw. the setting (LeaveShellOpen) exists in the plugin and maybe only needs to ne added to ui.

@davidegiacometti
Copy link
Collaborator

davidegiacometti commented Aug 29, 2021

@davidegiacometti
This could be implemented by a simple true/false setting "Don't close shell window". Thoughts?

Btw. the setting (LeaveShellOpen) exists in the plugin and maybe only needs to ne added to ui.

Not really sure.. I think this will need further investigation.

  • Shell plugin can handle these configurations.
  • But is using a different config file %LOCALAPPDATA%\Microsoft\PowerToys\PowerToys Run\Settings\Plugins\Microsoft.Plugin.Shell\ShellPluginSettings.json.
  • In the current state plugin manager can manage only boolean options.

@htcfreek
Copy link
Collaborator Author

/dup #10259

@htcfreek htcfreek added the Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. label Aug 24, 2023
@microsoft-github-policy-service
Copy link
Contributor

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Idea-Enhancement New feature or request on an existing product Product-PowerToys Run Improved app launch PT Run (Win+R) Window Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. Run-Plugin Things that relate with PowerToys Run's plugin interface
Projects
None yet
Development

No branches or pull requests

8 participants