-
Notifications
You must be signed in to change notification settings - Fork 8
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
[args] Allow customising options help angle brackets (or change them to double quotes) #848
Comments
This is afaik pretty standard syntax (see the git usage text for example https://git-scm.com/docs/git) |
I would personally be more likely to include the |
Sure, the problem is that there is no good way to communicate to the user that adding |
Including " is correct when there are multiple comma-separated options (as adding |
And to be on the same page: I'd not add <> as well, but not everyone has good experience with CLIs and sometime people say that they saw and though that this is how it supposed to be passed (because help shows it so). |
I don't think that diverging from the standard is a net benefit? I can see an argument that |
I think it's an unfair statement which downplays the fact that the help output is simply not helping to use the option correctly. In other words it's a UX issue.
Does this look like a meaningful output? Though I agree with @lrhn's point about ", so please feel free to close this if it's a won't fix (though I'd prefer this to be configurable). |
I am not trying to downplay or even make any statement about what is actually better, just to be clear. What I am saying is that even if we assume the premise of
Regarding the configuration option, I mostly just worry about configuration creep here, but I also worry about divergence in the experience of Dart command line tools. I would want to hear the opinions of more contributors before just closing the issue though. |
Also my opinion is based on the premise that |
I only know of two "standards" for specifying user-input-goes-here in text docs:
And there is apparently also underlining, as used by And for man pages, Linux man 7 man-pages says
That doc itself shows as-is text as normal and arguments as underlined when formatted for a TTY. It's what I think the upper-cased one may be slightly more common in older tools, and angle brackets more common in newer tools. Some use underline as well, others do not, but underline, and colors, are lost the moment you start piping the output to anything other than a TTY. Examples:
DOS behavior isn't helpful, it just uses plain lower-case words,
If the args package were to do change here, it would definitely not be using Converting to UPPER_SNAKE_CASE is an option, but then the user could just write that to begin with. Maybe add underlines if the output terminal supports ANSI? (Or maybe |
Can you please tell what "better" means in your case? Looks like copy-pasting every other option will not give a syntax error, but |
Hi,
When passing the
valueHelp
argument to an option, the printed value is wrapped into angle brackets (< and >), for example:What I've noticed is that users think these brackets are part of the syntax and try to add them. But this syntax is invalid (at least in the shells I/users have tried it in). Also I'm not aware if that's some common syntax.
It would be great to have double quotes instead as they are actually valid syntax, for example:
or at least a way to configure the used character.
The text was updated successfully, but these errors were encountered: