-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Single-character wrapped lines with long options #231
Comments
This is on click 3.3 and Python 2.7. |
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 have just run into this issue too. I'll try to have a stab at a PR for it tomorrow. |
Hello. I was just wondering if there is any progress on this bug? My options are wrapping very far. T :) |
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. |
@untitaker Are you able to look at #240? |
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. |
so you would suggest just wrapping to the next line, maybe with a small indent (4-8 spaces)? |
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! |
I haven't looked into the issue properly. #240 is a workaround, but a proper fix is needed. |
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 |
If you want to try #240:
|
sorry, I haven't had time to come back to this yet. I'll try to revisit it this week for another fix. |
When I run the script at the bottom I get the following output. I would, obviously, expect ALSOLONG to be all together on the second row.
The text was updated successfully, but these errors were encountered: