cli
cli copied to clipboard
Help text should automatically wrap based on term width
When we got a long text description in Usage, it should automatically wrap and make a nice display. A bit like what "man" does, it automatically rewraps the text so it fits nicely in the current terminal session.
+1
+1
+1
and should be able to handle \n in the various command and flag descriptions, indenting appropriately.
...or simply wrap at 80 characters, which is considered a common default and also adheres to general readability best-practises.
This feature is now in review - @urfave/cli please add a 👍 or 👎 to the top post if you're in favor or against this feature being added!
@lynncyrin we should move forward with this one. Wrapping based on the term width seems a sane default. :)
👀 this is now ready for anyone to work on!
...or simply wrap at 80 characters, which is considered a common default and also adheres to general readability best-practises.
I agree that an 80 character limit would be easier to read. It would also be easier to implement. That said, I don't want to bikeshed this issue. Whoever actually does the work to implement this will have my vote.
I will try to make #1119 implement a basic version of this feature.
This issue or PR has been automatically marked as stale because it has not had recent activity. Please add a comment bumping this if you're still interested in it's resolution! Thanks for your help, please let us know if you need anything else.
Bump.
This issue or PR has been bumped and is no longer marked as stale! Feel free to bump it again in the future, if it's still relevant.
This issue or PR has been automatically marked as stale because it has not had recent activity. Please add a comment bumping this if you're still interested in it's resolution! Thanks for your help, please let us know if you need anything else.
Bump.
This issue or PR has been bumped and is no longer marked as stale! Feel free to bump it again in the future, if it's still relevant.
This issue or PR has been automatically marked as stale because it has not had recent activity. Please add a comment bumping this if you're still interested in it's resolution! Thanks for your help, please let us know if you need anything else.
Bump.
This issue or PR has been bumped and is no longer marked as stale! Feel free to bump it again in the future, if it's still relevant.
Duplicate of #674
I added line-wrapping support in #287, but the terminal's width detection is not automatic (to avoid adding new dependencies/adding binary size). Here's an example of how client code can specify the line-wrap length: https://github.com/urfave/cli/pull/1119/files#diff-4d3f36d62cad94424544bb84fc93b33b73ffe3491a4ddca81a7f825539afc19cR1161-R1169