[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tilde (~) in bash(1) is typeset incorrectly as Unicode character
From: |
Steffen Nurpmeso |
Subject: |
Re: Tilde (~) in bash(1) is typeset incorrectly as Unicode character |
Date: |
Sat, 29 Jul 2023 02:27:03 +0200 |
User-agent: |
s-nail v14.9.24-496-g5b547df94e |
Chet Ramey wrote in
<2fd2ed52-3272-3433-6179-164bc51220c7@case.edu>:
...
|> At 2023-07-26T10:47:05+0200, Thomas ten Cate wrote:
|>> In the bash manual page (`man bash`), the ASCII tilde character '~'
|>> (0x7e) is replaced by the Unicode character '˜' (U+02DC SMALL TILDE):
|>>
|>> $ man bash | grep 'additional binary operator'
|>> An additional binary operator, =˜, is available,
|>>
|>> The same happens for the use of ~ as a shorthand for the home
|>> directory. This makes the manual page incorrect, and difficult to
|>> search.
...
|>> I don't know the first thing about groff, but `man groff_char`
|>> suggests that ~ is indeed rendered as "modifier tilde", and that one
|>> should write \(ti to obtain an actual tilde character.
Because i always have to give some remarks, this design decision
of James Clark of groff (~ is for accent) i personally always
found terrible. In the past i suggested to at least change the
mdoc(7) manual macros so that during arguments for .Pa (path) (and
similar, like code blocks etc) a tilde is indeed ASCII tilde, and
nothing else. Unfortunately that was not followed.
If i grep the manuals in the BSD git repo then they would benefit
from that decision; whereas ~ in paths is not often used, (ti is
never, unless i have overseen it. \(ti / \[ti] for ASCII tilde in
UNIX manuals, code blocks, formulas etc is just sick. And then
the world moved to UTF-8 long ago; i personally have never made
use of such crux in neither TeX nor roff, if all else fails you
can map something for a specific document.
Quite honestly, in NetBSD, only mdocml and groff use \(ti/\[ti],
In FreeBSD, only (external, new thing) bc(1) / dc(1), as well as
nvi and mandoc (mdocml), and less for its command line option.
On OpenBSD, mandoc plus
origin/master:lib/libc/gen/ispunct.3:.Dl
!\(dq#$%&\(aq()*+,\-./:;<=>?@[\e]\(ha_\(ga{|}\(ti
origin/master:lib/libcrypto/man/ASN1_BIT_STRING_set.3:.D1 Po Fa bitstr No &
Pf \(ti Fa goodbits Pc == 0
Plain tilde is the dead king, long live the king.
Thank you,
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)