为什么perldoc中存在如此多的ESC?

时间:2013-03-09 12:11:45

标签: perl freebsd

我正在使用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'没有这个问题。)

1 个答案:

答案 0 :(得分:4)

您看到原始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的内容,以及使用输出格式选项(也在该手册页中列出)。