Repository navigation
Ticket #5203: fix man viewing with mandoc in user menu - #5203
Merged
Merged
Conversation
zyv
requested changes
Oct 24, 2026
| m View manual page | ||
| MAN=%{Enter manual name} | ||
| %view{ascii,nroff} MANROFFOPT='@MAN_FLAGS@' MAN_KEEP_FORMATTING=1 man -P cat "$MAN" | ||
| %view{ascii,nroff} MANROFFOPT='@MAN_FLAGS@' MAN_KEEP_FORMATTING=1 MANPAGER=cat man "$MAN" |
Member
There was a problem hiding this comment.
Suggested change
| %view{ascii,nroff} MANROFFOPT='@MAN_FLAGS@' MAN_KEEP_FORMATTING=1 MANPAGER=cat man "$MAN" | |
| %view{ascii,nroff} MANROFFOPT='@MAN_FLAGS@' MAN_KEEP_FORMATTING=1 PAGER=cat man "$MAN" |
It seems that PAGER is universally supported, including across Solaris, AIX and HP-UX, and MANPAGER is only supported on Linux/BSD. I don't think in this context it's absolutely necessary to use MANPAGER specifically; does PAGER work for you?
Contributor
Author
There was a problem hiding this comment.
I think this will work. The documentation simply stated that MANPAGER should be used as a priority. If PAGER is more versatile, I’ll make the change.
Member
There was a problem hiding this comment.
Alright, please do it, and I'll merge. Thanks!
Many implementations of `man` lack the `-P` option. For example, `mandoc`, as well as those found on Solaris, AIX, HP-UX, and certain other systems. Therefore, this option is replaced by the universal environment variable PAGER. Signed-off-by: Max Logaev <logaevmax@gmail.com>
mxlgv
force-pushed
the
fixed-manpage-view-mandoc
branch
from
October 24, 2026 16:25
3293008 to
934987e
Compare
mandocmandoc
mandocmandoc in user menu
mandoc in user menumandoc in user menu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
A common environment variable
PAGERhas been added for nonman-dbsystems.manimplementation other thanman-db(e.g.,mandoc) is installed on the system, an error occurs when opening a man page, becausemandocdoes not support the-Poption.See Debian manpages:
The
PAGERoption is used instead ofMANPAGERfor better compatibility with Solaris, AIX and HP-UX systems.Checklist
git commit --amend -smake indent && make check)