-
Notifications
You must be signed in to change notification settings - Fork 24
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
Option descriptions only make sense "in hindsight" #77
Comments
btw this is something you can customize by providing a custom |
Then that's another documentation bug. I looked through the docs to see if I could figure out how to customize it and, starting from the entry point to the rustdocs, I completely missed that. ...which makes sense. Intuitively, that's sort of like looking on the (Granted, it was pretty late at the time, so I did see "Or implement LogLevel yourself for more control." but I more or less thought "No, that's not what I'm looking for. I don't need a custom filter. I need custom documentation." without looking inside.) Either way, I still think this should be fixed for the default behaviour. I have no problem with copy-pasting one of the stock |
Inspired by clap-rs#77
This is part of clap-rs#77
To leave room for further exploring this is why I didn't close it when pointing out #78 improved the docs. #79 made some tweaks to the help output, taking us from $ cargo run --example log -Fclap/help -- --help
Compiling clap v4.0.0
Compiling clap-verbosity-flag v2.1.0 (/home/epage/src/personal/clap-verbosity-flag)
Finished dev [unoptimized + debuginfo] target(s) in 2.05s
Running `target/debug/examples/log --help`
Foo
Usage:
Options:
-v, --verbose... More output per occurrence
-q, --quiet... Less output per occurrence
-h, --help Print help information to $ cargo run --example log -- --help
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
Running `target/debug/examples/log --help`
Foo
Usage: log [OPTIONS]
Options:
-v, --verbose... Increase logging verbosity
-q, --quiet... Decrease logging verbosity
-h, --help Print help information I didn't both with any commentary on repeated use because clap's |
In case the close/comment race dropped it on the floor, I noticed a typo in the change you were about to merge. ("out" where it should be "the".)
That's fair, but the |
It was meant to be "our" and fixed in master
I decided to rely on that because there wasn't a wording I liked and I didn't want progress blocked on perfection. |
I suspected as such, but I didn't mention it because, as an anglophone Canadian, it felt more like a weird ESL-ism than something a native speaker would ever choose. (You're neither in the hospitality industry nor a writer of ad copy and those are the two places I'd expect to see "our" used in that context. Since there's no competition over whose trait is the better solution for the problem of customizing clap-verbosity-flag's output, "our" just feels weird. The compiler only allows one trait to serve that role, so use the definite article.) |
Native speaker :) I chose "our" to emphasize it is coming from this package |
Again, I suspected as much from your name, but my point is that putting that emphasis there makes no sense when there's no choice to be made between "our" and "someone else's", so it devolves into feeling like a stylistic choice borrowed from ad copy for the sake of being a stylistic choice borrowed from ad copy. (Maybe it's just the amount of time I've poured into learning to write fiction, where it's very important to pay close attention to stylistic details like this.) |
It came from a misunderstanding of your confusion over why you ignored |
Ahh. That makes sense... but "our" wouldn't have helped in that case. It's too easy to gloss over and interpret as just a stylistic thing. If you're trying to address that potential mistake, you'd probably want to explicitly say |
To be perfectly frank, I only know what "More output per occurrence" and "Less output per occurrence" mean because I already know what the options they describe do and how they react to being used more than once.
"per occurrence" is such an opaque choice of phrasing that I'm not even sure they effectively communicate that the somewhat self-documenting
--verbose --verbose
will do something different from--verbose
.May I suggest taking inspiration from this excerpt from the UltiSnips snippet I use for starting Python scripts?
That's not ideal and, to be honest, I think I let a little "Avoid having to wrap it onto the next line of the source code" contaminate it, but it's still much more helpful.
Maybe something like "Make console output more verbose. Can be repeated for greater effect."
The text was updated successfully, but these errors were encountered: