-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Issue 428 redux #449
Issue 428 redux #449
Conversation
r? @Vinatorul (yo-bot has picked a reviewer for you, use r? to override) |
By default `clap` now automatically wraps and aligns help strings to the term width. i.e. ``` -o, --option <opt> some really long help text that should be auto aligned but isn't righ t now ``` Now looks like this: ``` -o, --option <opt> some really long help text that should be auto aligned but isn't right now ``` The wrapping also respects words, and wraps at spaces so as to not cut words in the middle. This requires the `libc` dep which is enabled (by default) with the `wrap_help` cargo feature flag. Closes #428
f3f9060
to
387b147
Compare
write_arg_help!(@flag self, w, tab, longest, nlh); | ||
write!(w, "\n") | ||
pub fn write_help<W: io::Write>(&self, w: &mut W, longest: usize, nlh: bool) -> io::Result<()> { | ||
let hw = HelpWriter::new( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there reason for 1 line per argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, missed that. Thanks
@sru or @Vinatorul I'll let you do the honors of the merge once you give it a quick once over. |
Edit: nevermind, didn't pan out. Safe to merge 👍 |
Can you make one
Something like that EDIT: of course, with appropriate |
@sru I tried this at first - but it caused a few issues with |
I'm gonna merge cause I've got some vacation coming up. This way I can make sure all is good and no maJoe bugs before I leave for a few days 😉 |
@homu r+ |
📌 Commit 031b717 has been approved by |
☀️ Test successful - status |
No description provided.