by TacticalCoder · 3y ago · 0 comments
... $ echo -n "-" | hexdump -C
I get 2d. That's ASCII. It's minus sign.Case closed. Anyone arguing for Unicode hyphen should be shot dead on the spot, no trial.
P.S: I hope it's not lost on people that both echo and hexdump took a parameter here, and that that parameter was passed preceded by the ASCII minus sign. Which is the whole point.
Unicode, unlike typewriters and ASCII, but following half a millenium of book printing tradition, encodes a hyphen and a minus separately. (Also a number of dashes, though perhaps fewer than medieval printers used.) The weird thing it resorts to calling HYPHEN-MINUS also has to be encoded and will probably persist in computer code (including Unix program arguments) forever, but in texts targeted at humans it has no place. The inadequacy of your (and my) keyboard is regrettable, but doesn’t really make for a great argument here.
let us not judge
In fact, I would guess that anything else than 2d as a command-line parameter prefix is a bug (bar using a /).
That said, normalization when searching is useful.
- Wrapping the lines to terminal window width
- Indenting blocks
- _Basic_ formatting (bold, underline - OK, colors - NO)
- Common blocks (like option descriptions) which apply consistent combination of rules above
Everything else should be plain text, just like the the computer code or shell commands.
(There is an interesting question of why is bold text accessible in manpage but not in code.. I think the answer for that is code's equivalent is syntax highlighter. Computer languages are regular enough that we can have computer highlight various syntaxical elements; while human languages are not, so we need to ask manpage authors to highlight them for us)