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

Help comment is unexpectedly mangled #121

Open
Timmmm opened this issue Feb 10, 2022 · 0 comments · May be fixed by #133
Open

Help comment is unexpectedly mangled #121

Timmmm opened this issue Feb 10, 2022 · 0 comments · May be fixed by #133

Comments

@Timmmm
Copy link

Timmmm commented Feb 10, 2022

I wrote the following code. I think it's a reasonable thing to do:

struct Opts {
    /// the target to build. One of:
    ///
    /// * clean                 Clean everything (including node_modules)
    /// * client                Build the Typescript extension client
    /// * isa                   Build the ISA processing tool
    /// * isa_generate          Use the ISA processing tool to generate the Rust code
    /// * npm_install           Run NPM install
    /// * package               Generate the VSIX package
    /// * release               Clean and rebuild everything and make a package
    /// * server                Build the Rust language server
    /// * tree_sitter_generate  Generate the Tree-Sitter C code from the grammar
    #[argh(positional)]
    target: Target,

Unfortunately it gets rendered in --help like this:

Positional Arguments:
  target            the target to build. One of: * clean                 Clean
                    everything (including node_modules) * client               
                    Build the Typescript extension client * isa                 
                     Build the ISA processing tool * isa_generate          Use
                    the ISA processing tool to generate the Rust code *
                    npm_install           Run NPM install * package             
                     Generate the VSIX package * release               Clean and
                    rebuild everything and make a package * server              
                     Build the Rust language server * tree_sitter_generate 
                    Generate the Tree-Sitter C code from the grammar

It seems like argh strips each line and then joins them into one string. I think that's a bit unexpected. Probably worth checking what structopt does.

Timmmm added a commit to Timmmm/argh that referenced this issue Jul 15, 2022
Timmmm added a commit to Timmmm/argh that referenced this issue Jul 15, 2022
@Timmmm Timmmm linked a pull request Jul 15, 2022 that will close this issue
Timmmm added a commit to Timmmm/argh that referenced this issue Nov 16, 2023
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

Successfully merging a pull request may close this issue.

1 participant