These are chat archives for kbknapp/clap-rs

25th
Feb 2018
Katharina
@spacekookie
Feb 25 2018 00:37
Is it at some point planned or even desired to let clap properly do line-breaking on long descriptions?

So:

    cmd     Really long description, bla bla bla
            and a really small terminal because 
            I can't afford anything else

instead of

    cmd     Really long description, bla bla bla
and a really small terminal because I can't 
afford anything else
Or does it already do that and I'm doing something wrong? :sweat_smile:
Denis Lisov
@tanriol
Feb 25 2018 00:56
@spacekookie It seems to already work for argument descriptions, but not for subcommands, so probably this is a bug.
Katharina
@spacekookie
Feb 25 2018 00:57
Oh damn, yea just realised that.
To the issue opening machine :sparkles:
opens new tab
There are 69 issues...I can't open a new one now :weary:
Denis Lisov
@tanriol
Feb 25 2018 01:03
Is it too many or is the current number looking too nice? :-)
Katharina
@spacekookie
Feb 25 2018 01:04
I don't want to interrupt their fun xD
Okay now I'm getting paranoid 🤨 I just tried to make a small example to demonstrate the problem and now it works :|
Katharina
@spacekookie
Feb 25 2018 01:12
Alright, so it appears not to break the lines properly if the terminal is smaller than ~90 characters for me
Denis Lisov
@tanriol
Feb 25 2018 01:16
...and for wider terminals it looks like it's breaking them to a fixed length, not to the terminal width...
Katharina
@spacekookie
Feb 25 2018 01:16
I'm gonna rephrase my issue then. Because sorting this out would be really good for 3.0 :P
Denis Lisov
@tanriol
Feb 25 2018 01:18
Are you gonna fix a different issue after creating this one to resume the fun? :-P
Katharina
@spacekookie
Feb 25 2018 01:18
I don't think I have any other choice :joy:
Katharina
@spacekookie
Feb 25 2018 01:32
Opened kbknapp/clap-rs#1194
Kevin K.
@kbknapp
Feb 25 2018 01:43
@spacekookie please don't hesitate to open new ones! Many of the old issues are tracking issues and just to remind me of things I want to work on
I'm on mobile right now, but I'll check the issue out tomorrow, if it's what I think it is it's a super simple fix
Katharina
@spacekookie
Feb 25 2018 01:44
Awesome :+1:
Kevin K.
@kbknapp
Feb 25 2018 01:45
Also, did you compile with the wrap_help cargo feature?
Katharina
@spacekookie
Feb 25 2018 01:45
I didn't :o I can try that though
Kevin K.
@kbknapp
Feb 25 2018 01:45
Because it looks like it's just using the default of 120, which it used when it can't determine your terminal size
Katharina
@spacekookie
Feb 25 2018 01:46
>.> Yea that actually fixed it
Why is that a different feature though?
I would think that wrapping the terminal size should be default behaviour. Otherwise, if it should remain a separate feature...maybe put a hint in the README :P
Kevin K.
@kbknapp
Feb 25 2018 03:14
Because it pulls in extra reps and for a while I believe those deps had some oddities about them which prevents them from being default.
It should be default in v3 (with the ability to opt out though) ;)
And it used to be the default until it broke something
You're right the read me shou
Should mention it
Katharina
@spacekookie
Feb 25 2018 03:24
The additional dependency is term-size, right?
Kevin K.
@kbknapp
Feb 25 2018 17:25
@spacekookie yep
and textwrap