【问题标题】:Why there is so much ESCs in perldoc?为什么 perldoc 中有这么多 ESC?
【发布时间】:2013-02-24 23:20:04
【问题描述】:

我使用的是 FreeBSD 9.1。

当我输入“perldoc perl”时:

    PERL(1)               User Contributed Perl Documentation              PERL(1)



ESC[1mNAMEESC[0m
       perl - The Perl 5 language interpreter

ESC[1mSYNOPSISESC[0m
       ESC[1mperl ESC[22m[<C2> ESC[1m-sTtuUWXESC[22m<C2> ]      [<C2> ESC[1m-hvESC[22m<C2> ]<C2> [<C2> ESC[1m-VESC[22m[:ESC[4mconfigvarESC[24m]<C2> ]
            [<C2> ESC[1m-cwESC[22m<C2> ]<C2> [<C2> ESC[1m-dESC[22m[ESC[1mtESC[22m][:ESC[4mdebuggerESC[24m]
<C2> ]<C2> [<C2> ESC[1m-DESC[22m[ESC[4mnumber/listESC[24m]<C2> ]
            [<C2> ESC[1m-pnaESC[22m<C2> ]<C2> [<C2> ESC[1m-FESC[4mESC[22mpatternESC[24m<C2> ]<C2> [<C2> ESC[1m-lESC[22m[ESC[4moctalESC[24m]<C2> ]<C2> [<C2> ESC[1m-0ESC[22m[ESC[4moctal/hexadecimalESC[24m]<C2> ]
            [<C2> ESC[1m-IESC[4mESC[22mdirESC[24m<C2> ]<C2> [<C2> ESC[1m-mESC[22m[ESC[1m-ESC[22m]ESC[4mmoduleESC[24m<C2> ]<C2> [<C2> ESC[1m-MESC[22m[ESC[1m-ESC[22m]ESC[4m'module...'ESC[24m<C2> ]<C2> [<C2> ESC[1m-f
ESC[22m<C2> ]
            [<C2> ESC[1m-C<C2> [ESC[4mnumber/listESC[24m]<C2> ESC[22m]      [<C2> ESC[1m-SESC[22m<C2> ]      [<C2> ESC[1m-xESC[22m[ESC[4mdirESC[24m]<C2> ]
            [<C2> ESC[1m-iESC[22m[ESC[4mextensionESC[24m]<C2> ]
            [<C2> [ESC[1m-eESC[22m|ESC[1m-EESC[22m]<C2> ESC[4m'command'ESC[24m<C2> ]<C2> [<C2> ESC[1m--ESC[22m<C2> ]<C2> [<C2> ESC[4mprogramfileESC[24m<C2> ]<C2> [<C2> ESC[4margumentESC[24m<C2> ]...

ESC[1mGETTING HELPESC[0m
       The ESC[4mperldocESC[24m program gives you access to all the documentation that
       comes with Perl.  You can get more documentation, tutorials and
       community support online at <http://www.perl.org/>.

       If you're new to Perl, you should start by running "perldoc perlintro",
       which is a general intro for beginners and provides some background to
       help you navigate the rest of Perl's extensive documentation.  Run
       "perldoc perldoc" to learn more things you can do with ESC[4mperldocESC[24m.

       For ease of access, the Perl manual has been split up into several
       sections.

为什么有这么多 ESC? (如果我输入 'man perl' 没有这个问题。)

【问题讨论】:

  • 未来访问者:export LESS=mqeisz-2XR.
  • 应该重新打开,因为它确实符合与编程相关的问题范围由社区定义包括“程序员常用的软件工具”,perldoc 肯定是(我很困惑怎么会有人把它看作其他东西......)@Useless et。人。

标签: perl freebsd


【解决方案1】:

您看到的是原始的 nroff 格式(这些转义序列包含格式信息)。

在我的本地安装中,man perldoc

  perldoc looks up a piece of documentation in .pod format that is
  embedded in the perl installation tree or in a perl script, and
  displays it via "pod2man | nroff -man | $PAGER".

尝试检查nroff 是否在您的路径中,$PAGER 设置为什么,并使用输出格式选项(也在该手册页中列出)。

【讨论】:

猜你喜欢
  • 2014-07-30
  • 2010-09-10
  • 1970-01-01
  • 1970-01-01
  • 2016-06-14
  • 2011-06-18
  • 2011-10-04
  • 1970-01-01
  • 2010-10-06
相关资源
最近更新 更多