libre-man / unix-opts

Unix-style command line options parser
MIT License
107 stars 13 forks source link

fix print-opts* wrapping #34

Open travv0 opened 3 years ago

travv0 commented 3 years ago

A bug fix this time: i was incremented to add the length of the opt before last-newline was set, when last-newline should've been set to the index before the current opt since the newline is added to the string before the current opt is.

travv0 commented 3 years ago

I went ahead and removed the hard-coded 80 used for the max width for the usage line and made it configurable using the same keyword argument for describe that I used in the pull request that adds a max width to the opt descriptions