mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-20 07:51:14 -03:00
help2man 1.50 added \X'tty: link URL' hyperlink escapes to generated man pages. coreutils 9.10 is the first widely-deployed package to ship these, and it broke completion generation for most of its commands (only 17/106 man pages parsed successfully). The escape wraps option text like this: \X'tty: link https://example.com/a'\fB\-a, \-\-all\fP\X'tty: link' Two places needed fixing: - remove_groff_formatting() didn't strip \X'...', so Type1-4 parsers extracted garbage option names like "--all\X'tty" - Deroffer.esc_char_backslash() didn't recognize \X, falling through to the generic single-char escape which stripped only the \, leaving "X'tty: link ...'" as literal text. Option lines then started with X instead of -, so TypeDeroffManParser's is_option() check failed. Also handle \Z'...' (zero-width string) which has identical syntax. Closes #12578