Date: Wed, 23 Oct 2013 01:15:20 +0000 (UTC) From: Dru Lavigne <dru@FreeBSD.org> To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r43024 - head/en_US.ISO8859-1/books/handbook/basics Message-ID: <201310230115.r9N1FK9C037937@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dru Date: Wed Oct 23 01:15:20 2013 New Revision: 43024 URL: http://svnweb.freebsd.org/changeset/doc/43024 Log: Minor edits to the sections on Shells and Manual Pages. These sections are correct, though a bit on the light side. Modified: head/en_US.ISO8859-1/books/handbook/basics/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/basics/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/basics/chapter.xml Tue Oct 22 20:37:06 2013 (r43023) +++ head/en_US.ISO8859-1/books/handbook/basics/chapter.xml Wed Oct 23 01:15:20 2013 (r43024) @@ -3143,7 +3143,7 @@ Swap: 2048M Total, 2048M Free <indexterm><primary>shells</primary></indexterm> <indexterm><primary>command line</primary></indexterm> - <para>&os; provides a command line interface called a shell. A + <para>A <firstterm>shell</firstterm> provides a command line interface for interacting with the operating system. A shell receives commands from the input channel and executes them. Many shells provide built in functions to help with everyday tasks such as file management, file globbing, command @@ -3162,8 +3162,8 @@ Swap: 2048M Total, 2048M Free <para>One common shell feature is filename completion. After a user types the first few letters of a command or filename and - presses <keycap>Tab</keycap>, the shell will automatically - complete the rest of the command or filename. Consider two + presses <keycap>Tab</keycap>, the shell automatically + completes the rest of the command or filename. Consider two files called <filename>foobar</filename> and <filename>foo.bar</filename>. To delete <filename>foo.bar</filename>, type <command>rm @@ -3177,7 +3177,7 @@ Swap: 2048M Total, 2048M Free is more than one match. Both <filename>foobar</filename> and <filename>foo.bar</filename> start with <literal>fo</literal>. By typing <literal>.</literal>, then pressing - <keycap>Tab</keycap> again, the shell would be able to fill in + <keycap>Tab</keycap> again, the shell is able to fill in the rest of the filename.</para> <indexterm><primary>environment variables</primary></indexterm> @@ -3186,10 +3186,13 @@ Swap: 2048M Total, 2048M Free variables. Environment variables are a variable/key pair stored in the shell's environment. This environment can be read by any program invoked by the shell, and thus contains a lot of program - configuration. Here is a list of common environment variables - and their meanings:</para> + configuration. Table 4.3 provides a list of common environment variables + and their meanings. Note that the names of environment + variables are always in uppercase.</para> + + <table frame="none" pgwide="1"> + <title>Common Environment Variables</title> - <informaltable frame="none" pgwide="1"> <tgroup cols="2"> <thead> <row> @@ -3253,7 +3256,8 @@ Swap: 2048M Total, 2048M Free <row> <entry><envar>PAGER</envar></entry> - <entry>The user's preferred text pager.</entry> + <entry>The user's preferred utility for viewing text one + page at a time.</entry> </row> <row> @@ -3263,7 +3267,7 @@ Swap: 2048M Total, 2048M Free </row> </tbody> </tgroup> - </informaltable> + </table> <indexterm><primary>Bourne shells</primary></indexterm> @@ -3294,9 +3298,9 @@ Swap: 2048M Total, 2048M Free meta-character is <literal>*</literal>, which represents any number of characters in a filename. Meta-characters can be used to perform filename globbing. For example, - <command>echo *</command> is equivalent to &man.ls.1; because + <command>echo *</command> is equivalent to <command>ls</command> because the shell takes all the files that match <literal>*</literal> - and &man.echo.1; lists them on the command line.</para> + and <command>echo</command> lists them on the command line.</para> <para>To prevent the shell from interpreting a special character, escape it from the shell by starting it with a backslash @@ -3306,13 +3310,13 @@ Swap: 2048M Total, 2048M Free string <literal>$TERM</literal>.</para> <sect2 id="changing-shells"> - <title>Changing Your Shell</title> + <title>Changing the Shell</title> <para>The easiest way to permanently change the default shell is to use <command>chsh</command>. Running this command will open the editor that is configured in the <envar>EDITOR</envar> environment variable, which by default - is set to &man.vi.1;. Change the <quote>Shell:</quote> line + is set to &man.vi.1;. Change the <literal>Shell:</literal> line to the full path of the new shell.</para> <para>Alternately, use <command>chsh -s</command> which will set @@ -3332,7 +3336,7 @@ Swap: 2048M Total, 2048M Free <screen>&prompt.root; <userinput>echo <replaceable>/usr/local/bin/bash</replaceable> >> /etc/shells</userinput></screen> - <para>Then rerun &man.chsh.1;.</para> + <para>Then, rerun &man.chsh.1;.</para> </note> </sect2> </sect1> @@ -3362,7 +3366,7 @@ Swap: 2048M Total, 2048M Free <replaceable>filename</replaceable> is the name of the file to be edited. Once inside the editor, all of the commands for manipulating the editor's functions are listed at the top of the - display. The caret <literal>^</literal> represents + display. The caret (<literal>^</literal>) represents <keycap>Ctrl</keycap>, so <literal>^e</literal> expands to <keycombo action="simul"><keycap>Ctrl</keycap><keycap>e</keycap></keycombo>. @@ -3372,33 +3376,28 @@ Swap: 2048M Total, 2048M Free modified.</para> <indexterm> - <primary>&man.vi.1;</primary> + <primary><command>vi</command></primary> </indexterm> <indexterm> <primary>editors</primary> - <secondary>&man.vi.1;</secondary> </indexterm> <indexterm> <primary><command>emacs</command></primary> </indexterm> - <indexterm> - <primary>editors</primary> - <secondary><command>emacs</command></secondary> - </indexterm> <para>&os; also comes with more powerful text editors, such as &man.vi.1;, as part of the base system. Other editors, like <filename role="package">editors/emacs</filename> and <filename role="package">editors/vim</filename>, are part of the &os; Ports Collection. These editors offer more functionality - at the expense of being a more complicated to learn. Learning a + at the expense of being more complicated to learn. Learning a more powerful editor such as <application>vim</application> or <application>Emacs</application> can save more time in the long run.</para> <para>Many applications which modify files or require typed input - will automatically open a text editor. To alter the default - editor used, set the <envar>EDITOR</envar> environment + will automatically open a text editor. To change the default + editor, set the <envar>EDITOR</envar> environment variable as described in <xref linkend="shells"/>.</para> </sect1> @@ -3423,10 +3422,7 @@ Swap: 2048M Total, 2048M Free </sect1> <sect1 id="basics-more-information"> - <title>For More Information</title> - - <sect2 id="basics-man"> - <title>Manual Pages</title> + <title>Manual Pages</title> <indexterm><primary>manual pages</primary></indexterm> @@ -3444,8 +3440,9 @@ Swap: 2048M Total, 2048M Free <screen>&prompt.user; <userinput>man ls</userinput></screen> - <para>The online manual is divided into numbered - sections:</para> + <para>Manual pages are divided into sections which represent the type of topic. In &os;, + the following + sections are available:</para> <orderedlist> <listitem> @@ -3481,13 +3478,13 @@ Swap: 2048M Total, 2048M Free </listitem> <listitem> - <para>Kernel developers.</para> + <para>System kernel interfaces.</para> </listitem> </orderedlist> <para>In some cases, the same topic may appear in more than one section of the online manual. For example, there is a - &man.chmod.1; user command and a + <command>chmod</command> user command and a <function>chmod()</function> system call. To tell &man.man.1; which section to display, specify the section number:</para> @@ -3499,8 +3496,8 @@ Swap: 2048M Total, 2048M Free written documentation, so &man.chmod.1; refers to the user command and &man.chmod.2; refers to the system call.</para> - <para>If the command name is unknown, use <command>man - -k</command> to search for keywords in the command + <para>If the name of the manual page is unknown, use <command>man + -k</command> to search for keywords in the manual page descriptions:</para> <screen>&prompt.user; <userinput>man -k <replaceable>mail</replaceable></userinput></screen> @@ -3509,19 +3506,17 @@ Swap: 2048M Total, 2048M Free keyword <quote>mail</quote> in their descriptions. This is equivalent to using &man.apropos.1;.</para> - <para>To determine what the commands in - <filename class="directory">/usr/bin</filename> do, + <para>To read the descriptions for the commands in + <filename class="directory">/usr/bin</filename>, type:</para> <screen>&prompt.user; <userinput>cd /usr/bin</userinput> -&prompt.user; <userinput>man -f *</userinput></screen> +&prompt.user; <userinput>man -f * | more</userinput></screen> <para>or</para> <screen>&prompt.user; <userinput>cd /usr/bin</userinput> -&prompt.user; <userinput>whatis *</userinput></screen> - - </sect2> +&prompt.user; <userinput>whatis * |more</userinput></screen> <sect2 id="basics-info"> <title>GNU Info Files</title>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310230115.r9N1FK9C037937>