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

Flake evaluation options documented in help strings are retaining html tags #10622

Open
2 tasks done
oxcabe opened this issue Apr 29, 2024 · 4 comments
Open
2 tasks done

Comments

@oxcabe
Copy link

oxcabe commented Apr 29, 2024

Problem

Using nix (Nix) 2.18.1.

The Options section in the nix flake <command> --help message is preserving the HTML tags.
e.g. running nix flake new --help will print the following at the end of the help message:

Options

    · <span id="opt-template">--template</span> / -t template

      The template to use.

    Common evaluation options:

    · <span id="opt-arg">--arg</span> name expr

      Pass the value expr as the argument name to Nix functions.

    · <span id="opt-argstr">--argstr</span> name string

      Pass the string string as the argument name to Nix functions.

    · <span id="opt-debugger">--debugger</span>

This could be caused by the manpages generation script not properly removing HTML tags.

This code seems relevant, too:

Proposal

  1. Figure out where the help message template is.
  2. Strip the HTML tags when creating manpages.

Checklist

Priorities

Add 👍 to issues you find important.

@oxcabe
Copy link
Author

oxcabe commented Apr 29, 2024

I want to contribute a PR to fix this issue, in case it's considered a valid concern 👍

@edolstra
Copy link
Member

This seems to be fixed on master (maybe because the lowdown dependency got updated?).

@edolstra
Copy link
Member

Actually I can't reproduce it on 2.18 either, e.g.

nix run nix/2.18.2 -- flake new --help

shows

    · --template / -t template The template to use. 

    Common evaluation options:

    · --arg name expr Pass the value expr as the argument name to Nix functions.

    · --argstr name string Pass the string string as the argument name to Nix functions.

@oxcabe
Copy link
Author

oxcabe commented Apr 30, 2024

It might just be a me thing then. I'll look further into it.

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

No branches or pull requests

2 participants