[man] Escape hyphens to prevent conversion to Unicode hyphens (#3885)

ASCII hyphens (U+002D HYPHEN-MINUS) in the option names (e.g. -x and
--extended) and the code examples in the man pages should be escaped
as \- (e.g. \-x and \-\-extended) to prevent them being converted to
Unicode hyphens in some environments.

For example, in openSUSE Tumbleweed, the raw ASCII hyphens in the
man-page sources are configured to be the Unicode hyphen (U+2010
HYPHEN).  This makes it impossible to search the option name in the
man page by e.g. /--extended[RET].  A problem also arises in copying
and pasting option names and code examples from the man page.  It
appears to be the normal ASCII hyphens by appearance (in typical
terminal fonts) but are not recognized as the ASCII hyphens by the
`fzf` command.
This commit is contained in:
Koichi Murase
2024-06-24 09:32:35 +09:00
committed by GitHub
parent a70ea4654e
commit 1525768094
2 changed files with 481 additions and 481 deletions

File diff suppressed because it is too large Load Diff