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

Pass-through arguments #39

Open
Tyrrrz opened this issue Jan 27, 2020 · 2 comments
Open

Pass-through arguments #39

Tyrrrz opened this issue Jan 27, 2020 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Tyrrrz
Copy link
Owner

Tyrrrz commented Jan 27, 2020

Add support for path-through arguments.

Sometimes the application may act as a proxy to another application. An example of this is dotnet run which routes any arguments after -- directly to the executed application.

Example:

dotnet run -c Release -- arg1 arg2 --flag

Arguments arg1, arg2, --flag are passed as is to the executed application.

Allow [CommandArgumentSink] attribute on properties of type IEnumerable<string> or any other type that can be assigned from a string array or initialized with a string array (similar to how we do conversions currently). There can only be one such property.

Note: this has to play nicely with #38.

Open question:

  • Should arguments after -- only be consumed by argument sinks?
  • If not, then we need to determine how parameters/options and argument sinks should work together.
@Tyrrrz Tyrrrz added the enhancement New feature or request label Jan 27, 2020
@drewburlingame
Copy link

Hiya, I found your tool from a reference and hadn't seen it before. I've been contributing to CommandDotNet. We implemented pass-through. Well, we had pass-through but realized I'd forgotten about the end-of-options feature which was the original reason -- was introduced.

If you're not aware of it, this may be interesting reading

This allows users to specify argument values that look like options, like Add -1 -2 or something that starts with --. We had to do some work to back-fit it so I thought I'd bring this up in case you weren't aware.

@Tyrrrz
Copy link
Owner Author

Tyrrrz commented May 12, 2020

Yep, I'm aware. Thanks!

@Tyrrrz Tyrrrz added help wanted Extra attention is needed hacktoberfest labels Sep 14, 2020
@Tyrrrz Tyrrrz changed the title Pass-through parameters Pass-through arguments Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants