Skip to content

man2hlp: remove escaping from dashes in section titles#5050

Merged
zyv merged 1 commit into
masterfrom
feature/fix-hlp-section-titles
Mar 6, 2026
Merged

man2hlp: remove escaping from dashes in section titles#5050
zyv merged 1 commit into
masterfrom
feature/fix-hlp-section-titles

Conversation

@zyv
Copy link
Copy Markdown
Member

@zyv zyv commented Mar 6, 2026

Proposed changes

Some 15 years ago, I did a mass-fixing of unescaped dashes in the manual pages, including section titles (8a692f9). Unfortunately, our man2hlp converter wasn't able to remove escaped dashes form the section titles. Now it can.

Screenshot 2026-03-05 at 19 56 55
hlp % diff -Naur mc.hlp.orig mc.hlp
--- mc.hlp.orig	2026-03-06 12:50:43.620959892 +0100
+++ mc.hlp	2026-03-06 12:52:50.133107091 +0100
@@ -55,7 +55,7 @@
   Internal Diff ViewerDiff Viewer
   Internal File ViewerInternal File Viewer
   Internal File EditorInternal File Editor
-  Options of editor in ini\-fileInternal File Editor / options
+  Options of editor in ini-fileInternal File Editor / options
   Screen selectorScreen selector
   CompletionCompletion
   Virtual File SystemVirtual File System

Some 15 years ago, I did a mass-fixing of unescaped dashes in the manual pages,
including section titles (8a692f9). Unfortunately, our man2hlp converter
wasn't able to remove escaped dashes form the section titles. Now it can.

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
@github-actions github-actions Bot added the needs triage Needs triage by maintainers label Mar 6, 2026
@github-actions github-actions Bot added this to the Future Releases milestone Mar 6, 2026
@github-actions github-actions Bot added the prio: medium Has the potential to affect progress label Mar 6, 2026
@zyv zyv requested review from egmontkob, mc-worker and ossilator March 6, 2026 12:03
@zyv zyv modified the milestones: Future Releases, 4.9.0 Mar 6, 2026
@zyv zyv added area: build Build system and (cross-)compilation area: docs Improvements or additions to documentation and removed needs triage Needs triage by maintainers labels Mar 6, 2026
Copy link
Copy Markdown
Contributor

@egmontkob egmontkob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just out of curiosity: what's the difference between - and \- in manpages?

@zyv
Copy link
Copy Markdown
Member Author

zyv commented Mar 6, 2026

Just out of curiosity: what's the difference between - and \- in manpages?

https://man.openbsd.org/mandoc_char.7#Dashes_and_Hyphens

In particular, Debian sticks to \- and regularly submits patches upstream for "offending" manual pages...

@egmontkob
Copy link
Copy Markdown
Contributor

So I guess it's only imporant to use \- where it really needs to stand for the ASCII - char, e.g. \-\-version, ctrl\-alt\-right=... etc.

The \ could be omitted in plain English text, such as Options of editor in ini-file, mc - Visual shell for Unix-like systems etc.?

But it's probably easier just to be consistent and use \- throughout, rather than have to stop and think each time?

@zyv
Copy link
Copy Markdown
Member Author

zyv commented Mar 6, 2026

But it's probably easier just to be consistent and use \- throughout, rather than have to stop and think each time?

Yes, exactly, especially as distro linting tools do not differentiate between the two usages.

@zyv zyv merged commit a37ae1c into master Mar 6, 2026
20 checks passed
@zyv zyv deleted the feature/fix-hlp-section-titles branch March 6, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build Build system and (cross-)compilation area: docs Improvements or additions to documentation prio: medium Has the potential to affect progress

Development

Successfully merging this pull request may close these issues.

3 participants