Re: '-' vs '\-' in TH (man(7))

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoth Alejandro Colomar:
$ grep -rn '^\.TH [^ ]*-' man*
man5/proc_sysrq-trigger.5:7:.TH proc_sysrq-trigger 5 (date) "Linux man-pages (unreleased)"
man7/man-pages.7:11:.TH man-pages 7 (date) "Linux man-pages (unreleased)"
man7/iso_8859-10.7:6:.TH ISO_8859-10 7 (date) "Linux man-pages (unreleased)"
man7/iso_8859-8.7:8:.TH ISO_8859-8 7 (date) "Linux man-pages (unreleased)"
man7/iso_8859-9.7:6:.TH ISO_8859-9 7 (date) "Linux man-pages (unreleased)"
man7/rtld-audit.7:8:.TH RTLD-AUDIT 7 (date) "Linux man-pages (unreleased)"
man7/bpf-helpers.7:30:.TH "BPF-HELPERS" 7 "2023-04-11" "Linux v6.2"
man7/iso_8859-14.7:6:.TH ISO_8859-14 7 (date) "Linux man-pages (unreleased)"
man7/user-keyring.7:6:.TH user-keyring 7 (date) "Linux man-pages (unreleased)"
man7/koi8-u.7:8:.TH KOI8-U 7 (date) "Linux man-pages (unreleased)"
man7/iso_8859-11.7:8:.TH ISO_8859-11 7 (date) "Linux man-pages (unreleased)"
man7/iso_8859-1.7:8:.TH ISO_8859-1 7 (date) "Linux man-pages (unreleased)"
man7/iso_8859-6.7:6:.TH ISO_8859-6 7 (date) "Linux man-pages (unreleased)"
man7/persistent-keyring.7:6:.TH persistent-keyring 7 (date) "Linux man-pages (unreleased)"
man7/signal-safety.7:6:.TH signal-safety 7 (date) "Linux man-pages (unreleased)"
man7/thread-keyring.7:6:.TH thread-keyring 7 (date) "Linux man-pages (unreleased)"
man7/iso_8859-4.7:6:.TH ISO_8859-4 7 (date) "Linux man-pages (unreleased)"
man7/process-keyring.7:6:.TH process-keyring 7 (date) "Linux man-pages (unreleased)"
man7/iso_8859-2.7:9:.TH ISO_8859-2 7 (date) "Linux man-pages (unreleased)"
man7/utf-8.7:10:.TH UTF-8 7 (date) "Linux man-pages (unreleased)"
man7/armscii-8.7:6:.TH ARMSCII-8 7 (date) "Linux man-pages (unreleased)"
man7/iso_8859-13.7:6:.TH ISO_8859-13 7 (date) "Linux man-pages (unreleased)"
man7/iso_8859-5.7:6:.TH ISO_8859-5 7 (date) "Linux man-pages (unreleased)"
man7/koi8-r.7:6:.TH KOI8-R 7 (date) "Linux man-pages (unreleased)"
man7/session-keyring.7:6:.TH session-keyring 7 (date) "Linux man-pages (unreleased)"
man7/user-session-keyring.7:6:.TH user-session-keyring 7 (date) "Linux man-pages (unreleased)"
man7/iso_8859-7.7:6:.TH ISO_8859-7 7 (date) "Linux man-pages (unreleased)"
man7/iso_8859-16.7:6:.TH ISO_8859-16 7 (date) "Linux man-pages (unreleased)"
man7/iso_8859-15.7:7:.TH ISO_8859-15 7 (date) "Linux man-pages (unreleased)"
man7/iso_8859-3.7:6:.TH ISO_8859-3 7 (date) "Linux man-pages (unreleased)"


Should the '-' in e.g. UTF-8 be hyphen, or should it be a minus?  Are all of
these hyphens?  And if so, why would a hyphen belong there?

It should be a hyphen. All of these are hyphens. A minus sign would belong if it was math stuff. A “Unix dash” (being the same character as a minus sign) would belong if those were not names for use in prose but names to be interpreted by the software, that requires the use of hyphen-minus. Your programs won’t accept command line options introduced by U+2010 ‐ HYPHEN. Your program called fun-program won’t be executed when typing fun‐program with U+2010. Otherwise (and beside its use in NAME), there is hardly any reason to use \-.

Perhaps an argument could be made about the copypastability of man page titles. I don’t want to make it and would disagree with it. Unless the thing you describe explicitly contains a hyphen-minus, don’t use \-.



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux