tuna-f1sh / cyme

List system USB buses and devices; a lib and modern cross-platform lsusb that attempts to maintain compatibility with, but also add new features
GNU General Public License v3.0
141 stars 7 forks source link

Enabled `wrap_help` feature for `clap` #1

Closed virtualritz closed 1 year ago

virtualritz commented 1 year ago

This makes the wrapping of some of the longer help descriptions look much nicer.

On that note: I would also suggest setting max_term_width to 72 to improve legibility.

45--90 chars/line is the suggested default for body text. I wish terminal apps paid more attention to this or there was an environment variable all CLI apps respected but alas. The good old 72 chars/line sits close to the middle of that so it's a good default.

If you like that idea I can open a PR for that too.

tuna-f1sh commented 1 year ago

Thanks I've merged this. I'll avoid the max_term_width for now since it's a polarizing topic and one I've personally moved away from too. It's a shame it's not an env as you say, so both crowds can be kept happy.

virtualritz commented 1 year ago

I'd wager the link you posted doesn't apply. This is about English text that describes CLI arguments. Linus' argument is about source code. I'd be very surprised if he (or his side of the crowd) would make the same argument for the length of comment lines. There is just no good reason.

The comsumer is a human and humans suck at keeeping track of text outside the limits I posted. A line of source code usually has groupings of tokens that we read so this argument doesn't apply. I.e. I am with Linus here, even if I prefer 80 chars line-wrapped code myself. ;)

tuna-f1sh commented 1 year ago

You make a good argument 👍 . I've now set it but chosen 80 because I find 72 just a little too boxy.