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

All -- parameters after the first -- are dropped, not allowing nesting of programs? #1161

Closed
da-x opened this issue Feb 3, 2018 · 1 comment

Comments

@da-x
Copy link

da-x commented Feb 3, 2018

(clap-rs v2.29.2)

Hi,

Suppose I am writing a program that executes another program, then of course it is convenient to take the arguments of the subprogram after --, as illustrated in the 22_stop_parsing_with_--.rs example. However, if the subprogram itself wants to receive --, then clap-rs does not seem to currently allow it, and -- is dropped.

To further explain, if I execute the 22_stop_parsing_with_--.rs example with the arguments -f -p=bob -- sloppy slop -a -- subprogram position args it prints the following:

-f used: true
-p's value: Some("bob")
'slops' values: Some(["sloppy", "slop", "-a", "subprogram", "position", "args"])

Where did the second -- go? Can I please have it back somehow?

da-x added a commit to da-x/clap-rs that referenced this issue Feb 3, 2018
Suppose there is a program that executes another program, then of
course it is convenient to take the arguments of the subprogram after
`--`, as illustrated in the 22_stop_parsing_with_--.rs example. However,
if the subprogram itself wants to receive `--`, then clap-rs should
allow it.

Fixes clap-rs#1161.
da-x added a commit to da-x/clap-rs that referenced this issue Feb 3, 2018
Suppose there is a program that executes another program, then it is
convenient to take the arguments of the subprogram after `--`, as
illustrated in the 22_stop_parsing_with_--.rs example. However, if
the subprogram itself wants to receive `--`, then clap-rs should
allow it.

Fixes clap-rs#1161.
@da-x
Copy link
Author

da-x commented Feb 3, 2018

I am currently testing the fix in pty-for-each.

@kbknapp kbknapp mentioned this issue Feb 12, 2018
87 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant