-
Notifications
You must be signed in to change notification settings - Fork 404
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
Support space as the delimiter for long arguments #17
Comments
I'm worried that this will make boolean arguments ambiguous. For example, does the following set the
Also #16 is a request to make arguments for any long argument optional, which I think makes sense, but would make parsing any long flag without an In the end, the main spec pflag follows when deciding how to parse flags is http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html which doesn't allow long options without an |
Actually The standard GNU
The docs you linked to above is the document for The So I think it would be more standards compliant (both with PS thanks for a great package - I'm using it in rclone. |
Looks like this is implemented in the spf13 fork. I switched to that for now. |
@josegonzalez thanks for the heads up - I'm going to investigate. |
Add docs and examples how to use the flag normalization func
Most cli tools I use have a space character to delimit the flag and it's option, and it would be cool to be able to do so for pflag. I realize this would be yet another departure from the
flag
stdlib, but it would definitely be cool to have.I tried just changing
https://github.com/ogier/pflag/blob/master/flag.go#L429
to a space character, but it seems I'll also need to change something inFlagSet
, just not sure where. Would be happy to make a PR adding another method that configures this and make the requisite changes given some direction :)The text was updated successfully, but these errors were encountered: