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

Subcommand and flag descriptions are inconsistently formatted. #28

Closed
hayleigh-dot-dev opened this issue Feb 17, 2024 · 4 comments
Closed

Comments

@hayleigh-dot-dev
Copy link

When displaying the description for a flag, the description is presented inline:

FLAGS:
    --help          Print help information
    --host=<STRING>     The host to run the server on.
    --no-styles=<BOOL>      When false, lustre/ui's styles will not be included.
    --port=<INT>        The port to run the server on.

Contrast this to the description of a subcommand:

SUBCOMMANDS:
    app
Build and bundle an entire Lustre application. The generated JavaScript module
calls your app's `main` function on page load and can be included in any Web
page without Gleam or Lustre being present.
    
    component
Build a Lustre component as a portable Web Component. The generated JavaScript
module can be included in any Web page and used without Gleam or Lustre being
present.

I think these should be formatted consistently, and in a way that handles the line-breaks sensibly. Perhaps something like:

SUBCOMMANDS:
    app        Build and bundle an entire Lustre application. The generated JavaScript module
               calls your app's `main` function on page load and can be included in any Web
               page without Gleam or Lustre being present.
    
    component  Build a Lustre component as a portable Web Component. The generated JavaScript
               module can be included in any Web page and used without Gleam or Lustre being
               present.
@TanklesXL
Copy link
Owner

oh this would be awesome! i've been wanting to implement some sort of more sophisticated pretty printer for the help text

@richard-viney
Copy link
Contributor

Currently taking a look at improving the indentation and line wrapping here, will do a PR unless someone else is already working on it?

@richard-viney
Copy link
Contributor

PR up! #41

@richard-viney
Copy link
Contributor

I think this issue can be closed now that #41 is merged

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

3 participants