<?xml version="1.0" encoding="utf-8"?>
<!-- -*- indent-tabs-mode: nil -*- -->
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY legal SYSTEM "legal.xml">
<!ENTITY appletversion "2.12">
<!ENTITY applet "Command Line">
<!ENTITY mdash "&#8212;">
]>
<!-- 
      (Do not remove this comment block.)
  Maintained by the GNOME Documentation Project
  http://developer.gnome.org/projects/gdp 
  Template version: 2.0 beta
  Template last modified Feb 12, 2002
  
-->
<!-- =============Document Header ============================= -->
<article id="index" lang="zh-CN">
<!-- please do not change the id; for translations, change lang to -->
<!-- appropriate code -->
<articleinfo> 
  <title>命令行手册</title> 
  <abstract role="description">
    <para>命令行允许您从面板运行命令，包括快速访问文件浏览器和命令历史记录。</para>
  </abstract>
  <copyright lang="en">
    <year>2005</year>
    <holder>Davyd Madeley</holder>
  </copyright>
  <copyright lang="en">
    <year>2004</year>
    <holder>Angela Boyle</holder>
  </copyright>
  <copyright lang="en"> 
    <year>2002</year>
    <year>2003</year> 
    <year>2004</year> 
    <holder>Sun Microsystems</holder> 
  </copyright>    
  <copyright lang="en"> 
    <year>1998</year> 
    <holder>Oliver Maruhn</holder> 
  </copyright>
  <copyright lang="en"> 
    <year>1998</year> 
    <holder>Dan Mueth</holder> 
  </copyright>
  <!-- translators: uncomment this:
       <copyright>
       <year>2003</year>
       <holder>ME-THE-TRANSLATOR (Latin translation)</holder>
       </copyright>
  -->
  <publisher role="maintainer"> 
    <publishername>GNOME 文档项目</publishername> 
  </publisher>

  

  <authorgroup>
    <author lang="en">
      <firstname>Sun </firstname>
      <surname>GNOME Documentation Team</surname>
      <affiliation>
        <orgname>Sun Microsystems</orgname>
      </affiliation>
    </author>
    <author lang="en">
      <firstname>Oliver</firstname>
      <surname>Maruhn</surname>
      <affiliation>
        <orgname>GNOME Documentation Project</orgname>
	<address><email>oliver@maruhn.com</email></address>
      </affiliation>
    </author>
    <author lang="en">
      <firstname>Dan</firstname>
      <surname>Mueth</surname>
      <affiliation>
        <orgname>GNOME Documentation Project</orgname>
	<address><email>d-mueth@uchicago.edu</email></address>
      </affiliation>
    </author>
    <author lang="en">
      <firstname>Angela</firstname>
      <surname>Boyle</surname>
      <affiliation>
        <orgname>GNOME Documentation Project</orgname>
      </affiliation>
    </author>
    <author lang="en">
      <firstname>Davyd</firstname><surname>Madeley</surname>
      <affiliation>
        <orgname>GNOME Project</orgname>
	<address><email>davyd@madeley.id.au</email></address>
      </affiliation>
    </author>
    <!-- This is appropriate place for other contributors: translators,
         maintainers,  etc. Commented out by default.
         <othercredit role="translator">
         <firstname>Latin</firstname> 
         <surname>Translator 1</surname> 
         <affiliation> 
         <orgname>Latin Translation Team</orgname> 
         <address> <email>translator@gnome.org</email> </address> 
         </affiliation>
         <contrib>Latin translation</contrib>
         </othercredit>
    -->
  </authorgroup> 
  <revhistory>
    <revision lang="en">
      <revnumber>Version 2.12</revnumber>
      <date>September 2005</date>
      <revdescription>
        <para role="author" lang="en">Davyd Madeley</para>
      </revdescription>
    </revision>
    <revision lang="en">
      <revnumber>Version 2.10</revnumber>
      <date>March 2005</date>
      <revdescription>
        <para role="author" lang="en">Davyd Madeley</para>
      </revdescription>
    </revision>
    <revision lang="en">
      <revnumber>Version 2.8</revnumber>
      <date>September 2004</date>
      <revdescription>
        <para role="author" lang="en">Angela Boyle</para>
        <para role="publisher" lang="en">GNOME Documentation Project</para>
      </revdescription>
    </revision>
    <revision lang="en"> 
      <revnumber>Command Line Applet Manual V2.7</revnumber> 
      <date>August 2004</date> 
      <revdescription> 
        <para role="author" lang="en">Sun Microsystems</para>
        <para role="publisher" lang="en">GNOME Documentation Project</para>
      </revdescription> 
    </revision>
    <revision lang="en"> 
      <revnumber>Command Line Applet Manual V2.6</revnumber> 
      <date>September 2003</date> 
      <revdescription> 
        <para role="author" lang="en">Sun Microsystems</para>
        <para role="publisher" lang="en">GNOME Documentation Project</para>
      </revdescription> 
    </revision>
    <revision lang="en"> 
      <revnumber>Command Line Applet Manual V2.5</revnumber> 
      <date>August 2003</date> 
      <revdescription> 
        <para role="author" lang="en">Sun Microsystems</para>
        <para role="publisher" lang="en">GNOME Documentation Project</para>
      </revdescription> 
    </revision>
    <revision lang="en"> 
      <revnumber>Command Line Applet Manual V2.4</revnumber> 
          <date>April 2003</date> 
          <revdescription> 
             <para role="author" lang="en">
                Sun Microsystems
             </para>
             <para role="publisher" lang="en">
                GNOME Documentation Project
             </para>
          </revdescription> 
        </revision>
        
			<revision lang="en"> 
          <revnumber>Command Line Applet Manual V2.3</revnumber> 
          <date>January 2003</date> 
          <revdescription> 
             <para role="author" lang="en">
                Sun Microsystems
             </para>
             <para role="publisher" lang="en">
                GNOME Documentation Project
             </para>
          </revdescription> 
        </revision> 

        <revision lang="en"> 
          <revnumber>Command Line Applet Manual V2.2</revnumber> 
          <date>August 2002</date> 
          <revdescription> 
             <para role="author" lang="en">
                Sun Microsystems
             </para>
             <para role="publisher" lang="en">
                GNOME Documentation Project
             </para>
          </revdescription> 
        </revision> 
        
         
        <revision lang="en"> 
          <revnumber>Command Line Applet Manual V2.1</revnumber> 
          <date>July 2002</date> 
          <revdescription> 
             <para role="author" lang="en">
                Sun Microsystems
             </para>
             <para role="publisher" lang="en">
                GNOME Documentation Project
             </para>
          </revdescription> 
        </revision> 
        <revision lang="en"> 
          <revnumber>Command Line Applet Manual V2.0</revnumber> 
          <date>March 2002</date> 
          <revdescription> 
             <para role="author" lang="en">
                Sun Microsystems
             </para>
             <para role="publisher" lang="en">
                GNOME Documentation Project
             </para>
          </revdescription> 
        </revision> 
        <revision lang="en"> 
          <revnumber>Mini-Commander Applet Manual</revnumber> 
          <date>1998</date> 
          <revdescription> 
             <para role="author" lang="en">
                Oliver Maruhn <email>oliver@maruhn.com</email>
             </para>
             <para role="publisher" lang="en">
                GNOME Documentation Project
             </para>
             <para role="author" lang="en">
                Dan Mueth <email>d-mueth@uchicago.edu</email>
             </para>
             <para role="publisher" lang="en">
                GNOME Documentation Project
             </para>
          </revdescription> 
        </revision> 
     </revhistory> 
     <releaseinfo>本手册讲述了命令行(Command Line) 2.12</releaseinfo> 
     <legalnotice> 
        <title>反馈</title> 
        <para>要报告关于命令行小程序或使用手册中的缺陷，或者提出建议，请参照 <ulink url="ghelp:gnome-feedback" type="help">GNOME 反馈页</ulink> 上的指导。</para>
     </legalnotice> 
  </articleinfo> 
  <indexterm zone="index" lang="en"> 
     <primary>Command Line</primary> 
  </indexterm> 
  <indexterm zone="index" lang="en"> 
     <primary>command line applet</primary> 
  </indexterm>

<!-- ============= Introduction =====-->
  <sect1 id="command-line-introduction"> 
     <title>介绍</title> 
     
     <!-- ==== Figure ==================-->
     <figure id="applet-fig"> 
        <title>命令行</title> 
        <screenshot> 
          <mediaobject lang="en"> 
             <imageobject><imagedata fileref="figures/command-line.png" format="PNG"/> 
             </imageobject> 
             <textobject> 
                <phrase>Shows Command Line.</phrase> 
             </textobject> 
          </mediaobject> 
        </screenshot> 
     </figure> 
     <para><application>命令行</application> 小程序在面板上提供一个命令输入行。</para>
     <para><application>命令行</application> 包含下面的交互元件：</para>
        
        <variablelist>
          <varlistentry>
             <term><guilabel>输入</guilabel> 文本框</term>
             <listitem>
                <para>您可以在 <guilabel>输入框</guilabel> 里输入命令、宏或程序。</para>
             </listitem>
          </varlistentry>
          <varlistentry>
             <term lang="en">
                <guilabel>Browser</guilabel> button — the bullet</term>
             <listitem>
                <para>您可以使用 <guibutton>浏览</guibutton> 按钮在文件系统里查找程序。<guibutton>浏览按钮</guibutton> 有一个正圆图标。</para>
             </listitem>
          </varlistentry>
          <varlistentry>
             <term lang="en">
                <guibutton>History</guibutton> button — the down arrow</term>
             <listitem>
                <para>您可以使用 <guibutton>历史</guibutton> 按钮来重新输入以前的命令。<guibutton>历史</guibutton> 按钮上有个向下箭头图标。</para>
             </listitem>
          </varlistentry>
        </variablelist> 
        <sect2 id="features">
	<title>特性</title>        
        <variablelist>
          <varlistentry>
             <term>以前运行命令的历史列表</term>
             <listitem>
                <para>您可以直接运行历史记录列表里的命令。您可以通过 <guilabel>输入框</guilabel> 来循环查看历史记录列表里的命令，或运行它。当列表里的命令超过 20 条以后，会显示一个垂直滚动条。更多相关信息，请参阅：<xref linkend="command-line-histlist"/>。</para>
             </listitem>
          </varlistentry>
          <varlistentry>
             <term>历史记录里的自动完成功能</term>
             <listitem>
                <para><application>命令行</application> 使用基于历史记录的自动完成功能，在 <guilabel>输入框</guilabel> 里输入命令。这个功能会对比 <guilabel>项目文本框</guilabel> 和历史记录列表里的内容。如果 <application>命令行</application> 发现有匹配项，就会完成命令的输入。更多相关信息，请参阅：<xref linkend="command-line-histlist"/>。</para>
             </listitem>
          </varlistentry>
          <varlistentry>
             <term>用户需求的命令完成功能</term>
             <listitem>
                <para>这个命令完成功能对比 <guilabel>输入框</guilabel> 和用户所在文件夹的命令。这个自动完成功能在您不知道命令的字母顺序或准确拼写时很有用。当你输入命令的开头几个字母，按 <keycap>Tab</keycap> 键。如果 <application>命令行</application> 识别出这个命令是独一无二的，就会完成这个命令的输入。更多相关信息，请参阅：<xref linkend="command-line-run"/>。</para>
             </listitem>
          </varlistentry>
          <varlistentry>
             <term>宏工具</term>
             <listitem>
                <para>宏工具提供了 99 个快捷键命令。另外您可以自己创建在 <application>命令行</application> 中使用的命令。更多相关信息，请参阅：<xref linkend="command-line-macros"/>。</para>
             </listitem>
          </varlistentry>
        </variablelist>
	</sect2>

      <sect2 id="command-line-introduction-add">       
        <title>添加命令行小程序到面板上</title>
        <para>要向面板上添加 <application>命令行</application>，在面板上点右键，然后选择 <guimenuitem>添加到面板</guimenuitem>。在出来的 <application>添加到面板</application> 对话框中，选择 <application>命令行</application>，然后点 <guibutton>添加</guibutton>。</para>
      </sect2>

  </sect1>
<!-- ================ Running Commands =======-->
  <sect1 id="command-line-usage"> 
     <title>运行命令</title>
	<!-- ================ To Run Command =======-->
     <sect2 id="command-line-run">
        <title>在输入文本框里运行命令</title>
        <para>要在 <guilabel>输入框</guilabel> 里运行命令，请按下面的步骤操作：</para>
        <orderedlist> 
          <listitem>
             <para>在 <guilabel>输入框</guilabel> 里输入命令。</para>
             <para>要让 <application>命令行</application> 自动补全输入的命令，按一下 <keycap>Tab</keycap> 键。</para>
          </listitem> 
          <listitem>
             <para>接着在 <guilabel>输入框</guilabel> 里输入命令选项，如果需要的话。</para>
          </listitem> 
          <listitem>
             <para>按一下 <keycap>回车键</keycap>。</para>
          </listitem> 
        </orderedlist>
	<para>如果您输入的命令不能运行，系统会发出一声鸣笛提醒，小程序会提示命令不能被运行，并在命令前面显示疑问标志(?)。检查一下命令是否正确拼写。点击一下命令行，疑问标志会自动消失。</para>
	<tip>
        <para>如果选中了自动完成选项，<application>命令行</application> 小程序会在第一步和第二步时，在历史记录里搜索匹配项。更多相关信息，请参阅：<xref linkend="command-line-histauto"/>。</para>
	</tip>
	</sect2>
<sect2 id="command-line-histauto">
		<title>基于历史记录的自动完成</title>
		<para>您可以在 <guilabel>自动完成</guilabel> 里，找 <guilabel>常规</guilabel> 标签的 <guimenu>首选项</guimenu> 菜单里启用或禁用这个选项。选中 <guilabel>启用基于历史记录的自动完成</guilabel>，将对比 <guilabel>输入框</guilabel> 和历史记录，如果有匹配的话就会自动完成。</para>
	        <para>如果选中了自动完成选项，<application>命令行</application> 将在 <xref linkend="command-line-run"/> 的第1步和第2步时，查找历史记录中是否有匹配项。如果在历史记录中有匹配项，<application>命令行</application> 会完成这个命令的输入。要接受这个命令，按一下 <keycap>回车键</keycap>。如果不想接受这个命令，在 <guilabel>输入框</guilabel> 里继续输入其它字符。</para>
     </sect2>
	<!-- ================ To Run Program =======-->
     <sect2 id="command-line-filesys"> 
        <title>运行文件系统中的程序</title> 
        <para>点击 <guibutton>浏览</guibutton> 按钮，显示文件系统，然后双击您想要运行的程序。</para>
        <para>您可以使用 <application>命令行</application> 来运行脚本、可执行命令或者运行文件系统中的其他程序。</para>
     </sect2> 
     <sect2 id="command-line-histlist"> 
        <title>运行历史记录列表中的上一个命令、宏或程序</title> 
        <para lang="en">
          You can run a previously executed command, macro, or program from the history list in one of the following ways: 
          <itemizedlist> 
             <listitem>
                <para lang="en">
                  Click on the <guibutton>History</guibutton> button to display the history list. Click on a history list item to run the command, macro, or program that you require.
                </para>
             </listitem> 
             <listitem>
                <para lang="en">
                  Click on the <guilabel>entry field</guilabel>, then use the keyboard up and down arrows to cycle through the history list. Press <keycap>Return</keycap> to run a specific command, macro, or program when the history list item you want is displayed in the <guilabel>entry field</guilabel>.
                </para>
             </listitem> 
          </itemizedlist>
        </para>

	<note>
		<title>基于历史记录的自动完成</title>
		<para>您可以在 <guilabel>自动完成</guilabel> 里，找 <guilabel>常规</guilabel> 标签的 <guimenu>首选项</guimenu> 菜单里启用或禁用这个选项。选中 <guilabel>启用基于历史记录的自动完成</guilabel>，将对比 <guilabel>输入框</guilabel> 和历史记录，如果有匹配的话就会自动完成。</para>
	</note>
     </sect2> 
</sect1>
<!-- ================ Using Macros =======-->
<sect1 id="command-line-macros">
	<title>使用快捷键或宏</title>
                <para>宏工具提供了近 99 个快捷键命令。另外您还可以使用 <application>命令行</application> 创建您自己的预定义命令。</para>
     <sect2 id="command-line-runmacro"> 
        <title>在输入框里运行宏</title> 
        <para lang="en">
          To run a macro that is defined in the <application>Command Line</application> <xref linkend="command-line-prefs-2"/> list, type the macro in the <guilabel> entry field</guilabel>, then press <keycap>Return</keycap>. 
        </para>
        <para>宏也可以使用 <xref linkend="command-line-histauto"/> 功能。</para>
        <para>下面列出了<application>命令行</application> 中使用宏的例子：</para>
        <informaltable frame="none"> 
          <tgroup cols="2" colsep="0" rowsep="0"><colspec colwidth="29.29*"/><colspec colwidth="70.71*"/> 
             <tbody> 
                <row valign="top"> 
                  <entry><para><userinput>http://</userinput> 或 <userinput>www.</userinput></para></entry> 
                  <entry><para>以 <userinput>http://</userinput> 或 <userinput>www.</userinput> 开始的，会被看作是 URL 网址，用网页浏览器打开它。</para></entry> 
                </row> 
                <row valign="top"> 
                  <entry><para><userinput>ftp://</userinput> 或 <userinput>ftp.</userinput></para></entry> 
                  <entry><para>以 <userinput>ftp://</userinput> 或 <userinput>ftp.</userinput> 开始的，会被看作是 URL 网址，用默认的 FTP 软件打开。</para></entry> 
                </row> 
                <row valign="top"> 
                  <entry><para lang="en"><userinput>dictionary:</userinput></para></entry> 
                  <entry><para><userinput>dictionary:</userinput>，会使用 <application>GNOME 字典</application> 查找一个词。</para></entry> 
                </row> 
                <row valign="top"> 
                  <entry><para lang="en"><userinput>google:</userinput></para></entry> 
                  <entry><para><userinput>google:</userinput>，会使用谷歌搜索引擎来搜索关键字。</para></entry> 
                </row> 
                <row valign="top"> 
                  <entry><para lang="en"><userinput>av:</userinput></para></entry> 
                  <entry><para><userinput>av:</userinput>，会使用 Altavista 搜索引擎来搜索关键字。</para></entry> 
                </row> 
                <row valign="top"> 
                  <entry><para lang="en"><userinput>yahoo:</userinput></para></entry> 
                  <entry><para><userinput>yahoo:</userinput> ，会使用 Altavista 搜索引擎来搜索关键字。</para></entry> 
                </row> 
                <row valign="top"> 
                  <entry><para lang="en"><userinput>fm:</userinput></para></entry> 
                  <entry><para><userinput>fm:</userinput>，在 Freshmeat 包数据库中搜索软件包。</para></entry> 
                </row> 
             </tbody> 
          </tgroup> 
        </informaltable>
     </sect2> 
    <sect2 id="command-line-prefs-2"> 
        <title>自定义宏</title> 
     <figure id="applet-macro-fig"> 
        <title>配置宏</title> 
        <screenshot> 
          <mediaobject lang="en"> 
             <imageobject><imagedata fileref="figures/prefs-macros.png" format="PNG"/> 
             </imageobject> 
             <textobject> 
                <phrase>Configuring Macros</phrase> 
             </textobject> 
          </mediaobject> 
        </screenshot> 
     </figure> 
        <para>这个标签里列出了您可以在 <application>命令行</application> 中使用的宏。列表包含以下信息：</para>
          <itemizedlist> 
             <listitem>
                <para>在 <guilabel>模板</guilabel> 列里是 UNIX 正则表达式。</para>
                <para>正则表达式是您想匹配的字符或数字模板。更多相关信息，请参阅 <command>regex</command> 帮助。</para>
             </listitem> 
             <listitem>
                <para><guilabel>命令</guilabel> 列里是命令。</para>
                <para>如果您在 <guilabel>输入框</guilabel> 里输入的内容成功匹配了一个命令，就会执行它。宏是一些可以用正则表达式来分析参数的命令。</para>
             </listitem> 
          </itemizedlist> 
		<para>要添加一个新宏，点 <guibutton>添加宏</guibutton> 按钮。要删除一个宏，先选中它，然后点 <guibutton>删除宏</guibutton> 按钮。</para>
     </sect2> 
</sect1>

<!-- ============= Appearance ============================= -->
  <sect1 id="command-line-apperance"> 
     <title>自定义外观</title> 
     <para lang="en">
     <figure id="applet-prefs-fig"> 
        <title lang="en">Preferences</title> 
        <screenshot> 
          <mediaobject lang="en"> 
             <imageobject><imagedata fileref="figures/prefs.png" format="PNG"/> 
             </imageobject> 
             <textobject> 
                <phrase>Preferences Dialog</phrase> 
             </textobject> 
          </mediaobject> 
        </screenshot> 
     </figure> 
        To configure the appearance of <application>Command Line</application>, right-click on an area of the applet outside the interactive elements, then choose <guimenuitem>Preferences</guimenuitem> and select the <guilabel>General</guilabel> tab.
     </para>
        <variablelist>
		<varlistentry>
		<term>移动命令行小程序：</term>
		<listitem>
		<para>选中 <guilabel>显示手柄</guilabel>，在小程序边上出来一个手柄。您可以拖动手柄来移动 <application>命令行</application> 到桌面其他位置。</para>
		</listitem>
		</varlistentry>
		<varlistentry>
		<term>添加边框：</term>
		<listitem>
		<para>选中此项，在 <application>命令行</application> 小程序四周显示边框。</para>
		</listitem>
		</varlistentry>
		<varlistentry>
		<term>更改宽度：</term>
		<listitem>
		<para>使用 <guilabel>宽度 . . . 像素</guilabel> 微调按钮框，指定小程序的宽度。</para>
		</listitem>
		</varlistentry>
		<varlistentry>
		<term>调节颜色主题：</term>
		<listitem>
			<itemizedlist>
				<listitem><para>选中 <guilabel>使用默认的主题颜色</guilabel>，将使用默认的 GNOME 主题颜色。</para></listitem>
				<listitem><para>点 <guilabel>命令行前景色</guilabel> 按钮，选择命令行中文本的颜色。如果选中了 <guilabel>使用默认主题颜色</guilabel>，这个按钮会变得不可用。</para></listitem>
				<listitem><para>点 <guilabel>命令行背景色</guilabel> 按钮，选择 <guilabel>输入框</guilabel> 背景的颜色。如果选中了 <guilabel>使用默认主题颜色</guilabel>，这个按钮会变得不可用。</para></listitem>
			</itemizedlist>
		</listitem>
		</varlistentry>	
	</variablelist>

  </sect1> 
</article>
