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

Fix #186 store unknown flags #187

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

NearlyUnique
Copy link

For review. First attempt at addressing #186.

@CLAassistant
Copy link

CLAassistant commented Oct 16, 2018

CLA assistant check
All committers have signed the CLA.

@NearlyUnique
Copy link
Author

There is still a bug where the last argument is unknown and the "--name value" syntax is used rather than the "---name=value" syntax. I will fix this

amterp added a commit to amterp/rad that referenced this pull request Nov 23, 2024
Unfortunately pflag does not let you get the ignored args, it just
tosses them away. In order for this feature to work, I'd need to dump
pflag as well and really do my own parsing. I don't really wanna do
that. This feature is not important enough, especially because you can
relatively easily have your own string[] 'rest' arg which you can then
join with spaces and offer as passthrough, with the downside of
expecting users to comma separate their args.

Some pflag Github discussions:

spf13/pflag#160
spf13/pflag#187
spf13/pflag#186
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

Successfully merging this pull request may close these issues.

2 participants