nix
nix copied to clipboard
Flake evaluation options documented in help strings are retaining html tags
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:
- https://github.com/NixOS/nix/blob/4161f3cfea10e77ad04cc189affeb5291c66c156/src/libcmd/common-eval-args.cc
Proposal
- Figure out where the help message template is.
- Strip the HTML tags when creating manpages.
Checklist
- [x] checked latest Nix manual (source)
- [x] checked open documentation issues and pull requests for possible duplicates
Priorities
Add :+1: to issues you find important.
I want to contribute a PR to fix this issue, in case it's considered a valid concern :+1:
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.
I wasn't able to figure out what happened. Closing this for now.