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

feat: Additional Arguments #106

Open
TheAngryByrd opened this issue Mar 6, 2018 · 1 comment
Open

feat: Additional Arguments #106

TheAngryByrd opened this issue Mar 6, 2018 · 1 comment

Comments

@TheAngryByrd
Copy link

TheAngryByrd commented Mar 6, 2018

Description

Hi there! I work on a tool dotnet-mono that allows mono programs to be run under the dotnet cli tooling and I'm trying to be as compatible with dotnet-run's options as possible. I'm trying to imitate their use of -- <additional arguments>.

$ dotnet run --help
Usage: dotnet run [options] [[--] <additional arguments>...]]

...

Additional Arguments::
  Arguments passed to the application that is being run.

How would I go about that in Argu? Is there a way to specify this or a way to override the usage as to show this option and I can parse it out myself? Thanks!

Related issue:
TheAngryByrd/dotnet-mono#33

@rmunn
Copy link

rmunn commented Mar 6, 2018

BTW, in Unix convention, a double-dash (--) argument means "stop parsing arguments now, and pass everything after the -- literally to the program". So for example, if you want to grep for the string -v in file.txt, you would use grep -- -v file.txt. Without the -- parameter, the -v would mean "invert match". See https://unix.stackexchange.com/questions/11376/what-does-double-dash-mean-also-known-as-bare-double-dash for more details.

Since this is a standard Unix convention, it would be a good idea for Argu to allow treating a user-defined string (defaulting to -- but changeable) as a "stop parsing arguments at this point" marker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants