NixOS / nix

Nix, the purely functional package manager

Home Page:https://nixos.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flake evaluation options documented in help strings are retaining html tags

oxcabe opened this issue · comments

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.

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

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

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.

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