Links in --help are weird (contain 8;;) #622

Closed
opened 2025-01-12 11:20:21 +00:00 by perchunpak · 4 comments

Describe the bug

image

Steps To Reproduce

  1. Run 'nix --help'

Expected behavior

image

nix --version output

nix (Lix, like Nix) 2.92.0-dev-pre20250107-3413ab5

Also tested on: nix (Lix, like Nix) 2.92.0-devpre20250110_d953e13

## Describe the bug ![image](/attachments/670a858c-4b32-48e4-893c-cbe646b1acb3) ## Steps To Reproduce 1. Run 'nix --help' ## Expected behavior ![image](/attachments/74d2cf0f-89a7-43ad-be11-ce99df6216e2) ## `nix --version` output nix (Lix, like Nix) 2.92.0-dev-pre20250107-3413ab5 Also tested on: nix (Lix, like Nix) 2.92.0-devpre20250110_d953e13
Member

The problem seems to be in the filterANSIEscapes function, because when I remove where this function is called in the renderMarkdownToTerminal function I get the following output.

image

Funnily, the filterAINSIEscapes has the following comment over it:

// FIXME(jade): replace with TerminalCodeEater. wowie this is evil code.
The problem seems to be in the [`filterANSIEscapes`](https://git.lix.systems/lix-project/lix/src/branch/main/lix/libutil/terminal.cc#L34-L102) function, because when I remove where this function is called in the `renderMarkdownToTerminal` function I get the following output. ![image](/attachments/59d90453-b264-4843-aa9d-576357d7952c) Funnily, the `filterAINSIEscapes` has the following comment over it: ``` // FIXME(jade): replace with TerminalCodeEater. wowie this is evil code. ```
298 KiB
lunaphied changed title from Links in --help are weird to Links in --help are weird (contain 8;;) 2025-02-21 17:42:24 +00:00
Owner

not a regression, this has been happening forever

not a regression, this has been happening forever
Member

This issue was mentioned on Gerrit on the following CLs:

  • commit message in cl/2776 ("libcmd/markdown: avoid stripping ANSI escapes")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix/+/2776", "number": 2776, "kind": "commit message"}], "cl_meta": {"2776": {"change_title": "libcmd/markdown: avoid stripping ANSI escapes"}}} --> This issue was mentioned on Gerrit on the following CLs: * commit message in [cl/2776](https://gerrit.lix.systems/c/lix/+/2776) ("libcmd/markdown: avoid stripping ANSI escapes")
Author

Can confirm that it is fixed, thanks everyone!

Can confirm that it is fixed, thanks everyone!
Sign in to join this conversation.
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#622
No description provided.