You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Single-character wrapped lines with long options #231
I've just done a bit of digging, and the problem is that click passes a subsequent_indent in to textwrap.TextWrapper; this is subtracted from the total width available on all but the first line to determine how wide they can be. In this example, that means that all but the first line end up with a potential width of -5, hence the single character lines.
I don't think it's the correct solution. I'm at a loss why Click wants to indent all options to match up with the command name... generally this is not going to fly on smaller terminals.
Does anyone have a suggestion for how to get around this issue in the most efficient way possible? I used Python 2.7, but if I switch to 3.0 will that fix it? Or anything less time intensive? Thank you for any pointers!
Okay, I see #240 changes formatting.py but i figured this was something that needed to be done in Click and then I'd reinstall Click. Is this something I can change locally? Thanks for your time. I'm new to software development (I generally do scripting/bioinformatics). If you are too busy, no worries! Thanks! @sjagoe
Activity
OddBloke commentedon Sep 29, 2014
This is on click 3.3 and Python 2.7.
OddBloke commentedon Sep 29, 2014
I've just done a bit of digging, and the problem is that click passes a subsequent_indent in to textwrap.TextWrapper; this is subtracted from the total width available on all but the first line to determine how wide they can be. In this example, that means that all but the first line end up with a potential width of -5, hence the single character lines.
sjagoe commentedon Oct 21, 2014
I have just run into this issue too. I'll try to have a stab at a PR for it tomorrow.
JTFouquier commentedon Mar 6, 2015
Hello. I was just wondering if there is any progress on this bug? My options are wrapping very far.
T
h
a
n
k
s
!
:)
sjagoe commentedon Mar 6, 2015
I have an open PR for this. I might pull that out into some code that can be applied in projects using click if the PR doesn't get reviewed.
sjagoe commentedon Mar 6, 2015
@untitaker Are you able to look at #240?
untitaker commentedon Mar 6, 2015
I don't think it's the correct solution. I'm at a loss why Click wants to indent all options to match up with the command name... generally this is not going to fly on smaller terminals.
sjagoe commentedon Mar 7, 2015
so you would suggest just wrapping to the next line, maybe with a small indent (4-8 spaces)?
JTFouquier commentedon Mar 16, 2015
Does anyone have a suggestion for how to get around this issue in the most efficient way possible? I used Python 2.7, but if I switch to 3.0 will that fix it? Or anything less time intensive? Thank you for any pointers!
untitaker commentedon Mar 16, 2015
I haven't looked into the issue properly. #240 is a workaround, but a proper fix is needed.
JTFouquier commentedon Mar 16, 2015
Okay, I see #240 changes formatting.py but i figured this was something that needed to be done in Click and then I'd reinstall Click. Is this something I can change locally? Thanks for your time. I'm new to software development (I generally do scripting/bioinformatics). If you are too busy, no worries! Thanks! @sjagoe
untitaker commentedon Mar 16, 2015
If you want to try #240:
sjagoe commentedon Mar 16, 2015
sorry, I haven't had time to come back to this yet. I'll try to revisit it this week for another fix.