* Spaces, underscores, and dashes in manual page names when using man(1)
@ 2026-09-11 0:13 Alejandro Colomar
0 siblings, 0 replies; only message in thread
From: Alejandro Colomar @ 2026-09-11 0:13 UTC (permalink / raw)
To: linux-man, man-db-devel
[-- Attachment #1: Type: text/plain, Size: 3152 bytes --]
Hi Colin,
I find this quite intriguing. Using a space in place of an underscore
in the name of a manual page seems to work, but using two seems to not
work. This seems inconsistent. I'd say this should either work for any
and/or all spaces, or for none of them.
$ man -aw proc_sys_fs_inotify
/usr/local/man/man5/proc_sys_fs_inotify.5
$ man -aw proc sys_fs_inotify
/usr/local/man/man5/proc_sys_fs_inotify.5
$ man -aw proc_sys fs_inotify
/usr/local/man/man5/proc_sys_fs_inotify.5
$ man -aw proc_sys_fs inotify
/usr/local/man/man5/proc_sys_fs_inotify.5
$ man -aw proc sys fs_inotify
/usr/local/man/man5/proc_sys.5
/usr/share/man/man5/proc_sys.5.gz
No manual entry for fs_inotify
$ man -aw proc sys_fs inotify
/usr/local/man/man5/proc_sys_fs.5
/usr/share/man/man5/proc_sys_fs.5.gz
/usr/local/man/man7/inotify.7
/usr/share/man/man7/inotify.7.gz
$ man -aw proc_sys fs inotify
/usr/local/man/man5/proc_sys_fs.5
/usr/share/man/man5/proc_sys_fs.5.gz
/usr/local/man/man7/inotify.7
/usr/share/man/man7/inotify.7.gz
$ man -aw proc sys fs inotify
/usr/local/man/man5/proc_sys.5
/usr/share/man/man5/proc_sys.5.gz
/usr/local/share/man/man5/filesystems.5
/usr/share/man/man5/filesystems.5.gz
/usr/local/man/man7/inotify.7
/usr/share/man/man7/inotify.7.gz
The same thing happens with dashes:
$ man -aw user-session-keyring
/usr/local/man/man7/user-session-keyring.7
/usr/share/man/man7/user-session-keyring.7.gz
$ man -aw user session-keyring
/usr/local/man/man7/user-session-keyring.7
/usr/share/man/man7/user-session-keyring.7.gz
$ man -aw user-session keyring
/usr/local/man/man7/user-session-keyring.7
/usr/share/man/man7/user-session-keyring.7.gz
$ man -aw user session keyring
No manual entry for user
/usr/local/man/man7/session-keyring.7
/usr/share/man/man7/session-keyring.7.gz
And also with combinations:
alx@devuan:~/src/linux/man-pages/man-pages/contrib$ man -aw proc_sysrq-trigger
/usr/local/man/man5/proc_sysrq-trigger.5
/usr/share/man/man5/proc_sysrq-trigger.5.gz
alx@devuan:~/src/linux/man-pages/man-pages/contrib$ man -aw proc sysrq-trigger
/usr/local/man/man5/proc_sysrq-trigger.5
/usr/share/man/man5/proc_sysrq-trigger.5.gz
alx@devuan:~/src/linux/man-pages/man-pages/contrib$ man -aw proc_sysrq trigger
/usr/local/man/man5/proc_sysrq-trigger.5
/usr/share/man/man5/proc_sysrq-trigger.5.gz
alx@devuan:~/src/linux/man-pages/man-pages/contrib$ man -aw proc sysrq trigger
/usr/local/man/man5/proc.5
/usr/share/man/man5/proc.5.gz
No manual entry for sysrq
No manual entry for trigger
The (one) space is well-known to work, and helps find documentation for
things like 'git diff' as 'man git diff', so that behavior should stay.
I suspect we also want to make it work for more than one space, though.
Or are there any important issues with handling more than one space?
Here's the version of man-db I have installed (Devuan unstable):
$ dpkg -l man-db | tail -n1
ii man-db 2.13.1-1 amd64 tools for reading manual pages
Have a lovely night!
Alex
--
<https://www.alejandro-colomar.es>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 0:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-11 0:13 Spaces, underscores, and dashes in manual page names when using man(1) Alejandro Colomar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).