Page MenuHomeFreeBSD

man(1) does not support spaces in filenames
ClosedPublic

Authored by wosch on Dec 28 2023, 3:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 12, 7:55 PM
Unknown Object (File)
Sep 15 2025, 2:14 PM
Unknown Object (File)
Aug 13 2025, 3:39 AM
Unknown Object (File)
Aug 12 2025, 5:06 PM
Unknown Object (File)
Aug 5 2025, 5:05 AM
Unknown Object (File)
Aug 4 2025, 6:46 PM
Unknown Object (File)
Jul 31 2025, 11:44 PM
Unknown Object (File)
Jul 29 2025, 9:16 AM
Subscribers

Details

Summary

There is another problem with white spaces. The globbing function in exists() cannot handle white spaces. This is not trivial to fix, we have to rewrite the function.

mkdir -p man/man1
cp /usr/share/man/man1/cat.1.gz "man/man1/ZZZ cat.1.gz"
/usr/bin/man -M man "ZZZ cat"
No manual entry for ZZZ
No manual entry for cat

see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275978

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

wosch requested review of this revision.Dec 28 2023, 3:07 PM
This revision is now accepted and ready to land.Jan 4 2024, 4:23 AM
emaste added inline comments.
usr.bin/man/man.sh
194–196

should this comment be "at least one real file"?

206–213

style in the rest of the file seems to want
for file in ...; do
but but fine either way

This revision was automatically updated to reflect the committed changes.