Skip to content
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

How could I add some multi-line arg descriptions? #1

Open
benwiley4000 opened this issue May 1, 2019 · 1 comment
Open

How could I add some multi-line arg descriptions? #1

benwiley4000 opened this issue May 1, 2019 · 1 comment

Comments

@benwiley4000
Copy link

benwiley4000 commented May 1, 2019

First of all... this library is great and gave me what pretty much nothing else I could find had:

  • Intuitive opts parsing
  • Great autogeneration of help pages
  • Small and portable
  • Works with bash 3

So thanks!!

Anyway, my issue is what the title says.. some things are hard to sum up in 30 characters or whatever I have until the 80 char limit is passed, and it would be nice if I could have nicely-formatted multiline descriptions of commands and flags. Maybe there's already a way, but I'm not sure what it is!

Disclaimer: I am not very good at bash, I'm just trying to write a tool that works without asking anyone to install something first. :)

@turdusmerula
Copy link
Owner

Multiline is not well supported but you can do it by hand if you use the getopt_add_text command, the thing is that you will have to split your descriptions manually.
Here is an example:

getopt_add_flag              "--flag2"                         "Flag with no short name" opt_flag2
getopt_add_text          "        Some additional description"

Once you have a proper result the behaviour of the lib is quite predictive and should therefore render the same on any screen. Nevertheless the library uses the tab character and there is no guarantee that you will find it defined with the same size on each system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants