coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

`man 1 test` is badly formated

Open julian-klode opened this issue 4 months ago • 1 comments

Forwarded from https://bugs.launchpad.net/ubuntu/+source/rust-coreutils/+bug/2115782:

$ ll /usr/share/man/man1/test.1.gz
lrwxrwxrwx 1 root root 14 Jun 6 18:04 /usr/share/man/man1/test.1.gz -> rust-test.1.gz

$ man /usr/share/man/man1/rust-test.1.gz
[...]
       * -b FILE FILE exists and is block special * -c FILE FILE exists and is character special * -d FILE FILE exists and is a directory * -e
       FILE FILE exists * -f FILE FILE exists and is a regular file * -g FILE FILE exists and is set-group-ID * -G FILE FILE exists and is
       owned by the effective group ID * -h FILE FILE exists and is a symbolic link (same as -L) * -k FILE FILE exists and has its sticky bit set * -L
       FILE FILE exists and is a symbolic link (same as -h) * -N FILE FILE exists and has been modified since it was last read * -O FILE FILE ex‐
       ists and is owned by the effective user ID * -p FILE FILE exists and is a named pipe * -r FILE FILE exists and read permission is granted * -s
       FILE FILE exists and has a size greater than zero * -S FILE FILE exists and is a socket * -t FD file descriptor FD is opened on a termi‐
       nal * -u FILE FILE exists and its set-user-ID bit is set * -w FILE FILE exists and write permission is granted * -x FILE FILE exists and
       execute (or search) permission is granted
[...]

(I think all the dashes should be on separate lines, they were supposed to be a list)

julian-klode avatar Jul 21 '25 09:07 julian-klode

There is an issue with upstream , let me create an issue and fix it. https://github.com/clap-rs/clap/blob/583ba4ad9a4aea71e5b852b142715acaeaaaa050/clap_mangen/src/render.rs#L248C15-L248C25

there is no extra parsing logic inside after_help

Agent-Hellboy avatar Aug 04 '25 07:08 Agent-Hellboy

@Agent-Hellboy thank you for having reported the issue upstream, and suggested a solution. Sadly, it looks like the discussions have stall.

By chance, are there any workarounds that could be put in place in the meantime? e.g. adding blank lines between list items? Or not using list?

matttbe avatar Oct 14 '25 09:10 matttbe

By chance, are there any workarounds that could be put in place in the meantime? e.g. adding blank lines between list items? Or not using list?

Sure, I will add a PR.

Agent-Hellboy avatar Oct 14 '25 09:10 Agent-Hellboy