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

Update docs for PT Run: Start apps with parameter (Program plugin) #10062

Closed
htcfreek opened this issue Mar 5, 2021 · 10 comments
Closed

Update docs for PT Run: Start apps with parameter (Program plugin) #10062

htcfreek opened this issue Mar 5, 2021 · 10 comments
Assignees
Labels
Issue-Docs Documentation issue that needs to be improved Product-PowerToys Run Improved app launch PT Run (Win+R) Window Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. Run-Plugin Things that relate with PowerToys Run's plugin interface

Comments

@htcfreek
Copy link
Collaborator

htcfreek commented Mar 5, 2021

How to start apps with parameters via program plugin.

The following things should work:

  • app -param ...
  • app /param ...
  • app --parameter ...
  • app -- parameter ... (Here -- is used as delimiter by PT Run.)
@htcfreek htcfreek added Issue-Docs Documentation issue that needs to be improved Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Mar 5, 2021
@enricogior enricogior added Product-PowerToys Run Improved app launch PT Run (Win+R) Window Run-Plugin Things that relate with PowerToys Run's plugin interface and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Mar 5, 2021
@dedavis6797
Copy link
Contributor

@htcfreek for clarity, would this be an example of what I'd type for an executable "myProgram.exe" with three parameter values val1, val2, val3:
.myProgram.exe -param val1 val2 val3

@htcfreek
Copy link
Collaborator Author

htcfreek commented Mar 11, 2021

@htcfreek for clarity, would this be an example of what I'd type for an executable "myProgram.exe" with three parameter values val1, val2, val3:
.myProgram.exe -param val1 val2 val3

This has something to do what .myProgram.exe expects. But the point is that PT Run sais everything after -parameter and -parameter is the parameter. So in your example you enter 4 parameters.

  • .myProgram.exe -param val1 val2 val3 = myProgram.exe and -param val1 val2 val3
  • .myProgram.exe /param val1 val2 val3 = myProgram.exe and /param val1 val2 val3
  • .myProgram.exe --param val1 val2 val3 = myProgram.exe and --param val1 val2 val3
  • .myProgram.exe -- param val1 val2 val3 = myProgram.exe and param val1 val2 val3

Exampel
cmd.exe /c echo test (Same behavior as Win+R prompt.)
cmd.exe -- /c echo test

Important note
Inputs like Mozilla Firefox -- www.google.de or Firefox -- www.google.de or edge --inprivate should also work. You don't have to type the exe name. App name works too.

@htcfreek
Copy link
Collaborator Author

Btw: .myprogramm.exe won't work because you get no results searching for exe name. (Except for special apps like cmd or explorer.)

@crutkas
Is this a bug or wanted?

@crutkas
Copy link
Member

crutkas commented Mar 11, 2021

Lets take a step back, I couldn't find a .33 PR that enabled this style behavior. More so for .. What they are clearly asking for is for > style behavior to be smarter and allow for additional params to be passed in.

. is for app name. example, .visual studio, not exe. Example below is not a valid command for app name
image

@htcfreek
Copy link
Collaborator Author

htcfreek commented Mar 12, 2021

Lets take a step back, I couldn't find a .33 PR that enabled this style behavior. More so for .. What they are clearly asking for is for > style behavior to be smarter and allow for additional params to be passed in.

. is for app name. example, .visual studio, not exe. Example below is not a valid command for app name
image

But why is .cmd.exe /k echo test or .explorer.exe working then and what is the difference of these commands to firefox.exe or msedge.exe?

@dedavis6797
Copy link
Contributor

Docs have been updated, we had to use explicit examples because app -param ... and the rest caused too much ambiguity on the proper usage of this feature. To clarify expectations on the .exe behavior, I've opened issue #10210 for further discussion/planning.

@htcfreek
Copy link
Collaborator Author

htcfreek commented Mar 12, 2021

Lets take a step back, I couldn't find a .33 PR that enabled this style behavior. More so for .. What they are clearly asking for is for > style behavior to be smarter and allow for additional params to be passed in.

@crutkas
The PR that introduce the commandline feature is #5791.

@htcfreek
Copy link
Collaborator Author

Docs have been updated, we had to use explicit examples because app -param ... and the rest caused too much ambiguity on the proper usage of this feature. To clarify expectations on the .exe behavior, I've opened issue #10210 for further discussion/planning.

@dedavis6797
For the examples you can look at the tests in PR #5791.

@htcfreek
Copy link
Collaborator Author

Docs have been updated, we had to use explicit examples because app -param ... and the rest caused too much ambiguity on the proper usage of this feature. To clarify expectations on the .exe behavior, I've opened issue #10210 for further discussion/planning.

@dedavis6797
For the examples you can look at the tests in PR #5791.

@dedavis6797
Do you rework the examples in docs later if #10210 is done?

@dedavis6797
Copy link
Contributor

@dedavis6797
Do you rework the examples in docs later if #10210 is done?

Yes that is the expectation.

@crutkas crutkas added the Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. label Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Docs Documentation issue that needs to be improved Product-PowerToys Run Improved app launch PT Run (Win+R) Window Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. Run-Plugin Things that relate with PowerToys Run's plugin interface
Projects
None yet
Development

No branches or pull requests

4 participants