手册页使用的默认PAGER是什么?

手册页使用的默认PAGER是什么。

我,这个程序运行的是什么程序页面?

它看起来less 。 我确信它不会more因为more不支持反向反向。

man man

  ... The pager can be specified in a number of ways, or else will fall back to a default is used (see option -P for details). ... -P pager, --pager=pager Specify which output pager to use. By default, man uses pager -s. This option overrides the $MANPAGER environment variable, which in turn overrides the $PAGER environment variable. It is not used in conjunction with -f or -k. 

pager/usr/bin/pager )使用Debian替代系统 (通过/etc/alternatives/pager )设置,默认为less

 $ update-alternatives --display pager pager - auto mode link currently points to /bin/less /bin/less - priority 77 slave pager.1.gz: /usr/share/man/man1/less.1.gz /bin/more - priority 50 slave pager.1.gz: /usr/share/man/man1/more.1.gz /usr/bin/pg - priority 10 slave pager.1.gz: /usr/share/man/man1/pg.1.gz /usr/bin/w3m - priority 25 slave pager.1.gz: /usr/share/man/man1/w3m.1.gz Current 'best' version is '/bin/less'. 

显然,这个特殊的默认值(使用名为pager的命令)是Debian衍生特征。 查看哪些系统具有“寻呼机”快捷方式/别名? 在Unix和Linux上。

默认情况下,它less 。 正如man man所说:

-P pager, – pager = pager

指定要使用的输出寻呼机。 默认情况下,man使用寻呼机
-s 。 此选项会覆盖$ MANPAGER环境变量,该变量又会覆盖$ PAGER环境变量。 它不与-f或-k一起使用。

该值可以是简单的命令名称或带有参数的命令
ments,并可能使用shell引用(反斜杠,单引号或
双引号)。 它可能不会使用管道连接多个com-
mands; 如果需要,可以使用包装器脚本,该脚本可以将文件显示为参数或标准输入。

在基于Debian的系统上,包括Ubuntu, pager是一个less的符号链接:

 $ readlink -f /usr/bin/pager /bin/less 

这意味着man的默认pager -s less -s 。 你可以通过i)使用man-P选项来改变它; ii)设置MANPAGERPAGER环境变量。

Interesting Posts