Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177850305
D61747.1795429139.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D61747.1795429139.diff
View Options
diff --git a/usr.bin/man/man.1 b/usr.bin/man/man.1
--- a/usr.bin/man/man.1
+++ b/usr.bin/man/man.1
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd January 24, 2025
+.Dd November 19, 2026
.Dt MAN 1
.Os
.Sh NAME
@@ -370,6 +370,16 @@
If that has no value either,
.Ql less -s
is used.
+.Pp
+If standard output is not a terminal,
+no pager is used and the output is written directly to standard output,
+regardless of the value of
+.Ev MANPAGER
+or
+.Ev PAGER ,
+unless a pager was given with the
+.Fl P
+option.
.El
.Sh FILES
.Bl -tag -width "/usr/local/etc/man.d/*.conf" -compact
diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh
--- a/usr.bin/man/man.sh
+++ b/usr.bin/man/man.sh
@@ -616,7 +616,8 @@
K) Kflag=Kflag
REGEXP=$OPTARG ;;
M) MANPATH=$OPTARG ;;
- P) MANPAGER=$OPTARG ;;
+ P) MANPAGER=$OPTARG
+ Pflag=Pflag ;;
S) MANSECT=$OPTARG ;;
a) aflag=aflag ;;
d) debug=$(( $debug + 1 )) ;;
@@ -963,7 +964,9 @@
# Correctly sets $MANPAGER
setup_pager() {
# Setup pager.
- if [ -z "$MANPAGER" ]; then
+ if [ -z "$Pflag" ] && [ ! -t 1 ]; then
+ MANPAGER=cat
+ elif [ -z "$MANPAGER" ]; then
if [ -n "$MANCOLOR" ]; then
MANPAGER="less -sR"
else
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 23, 10:18 AM (15 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41867325
Default Alt Text
D61747.1795429139.diff (1 KB)
Attached To
Mode
D61747: man: Skip the pager when stdout is not a tty
Attached
Detach File
Event Timeline