[44f085a] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[44f085a] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[59a6b63] | 7 | <!-- Following URL does not have previous versions
|
---|
| 8 | <!ENTITY tcsh-download-http "http://www.sfr-fresh.com/unix/misc/tcsh-&tcsh-version;.tar.gz">-->
|
---|
| 9 | <!-- Following URL does have previous versions -->
|
---|
| 10 | <!ENTITY tcsh-download-http "http://fossies.org/linux/misc/tcsh-&tcsh-version;.tar.gz">
|
---|
[a8fc86c1] | 11 | <!ENTITY tcsh-download-ftp "ftp://ftp.astron.com/pub/tcsh/tcsh-&tcsh-version;.tar.gz">
|
---|
[9d92eb7a] | 12 | <!ENTITY tcsh-md5sum "59d40ef40a68e790d95e182069431834">
|
---|
| 13 | <!ENTITY tcsh-size "980 KB">
|
---|
| 14 | <!ENTITY tcsh-buildsize "12.3 MB (with tests)">
|
---|
[59a6b63] | 15 | <!ENTITY tcsh-time "0.2 SBU (with tests)">
|
---|
[44f085a] | 16 | ]>
|
---|
| 17 |
|
---|
[0b5a693] | 18 | <sect1 id="tcsh" xreflabel="Tcsh-&tcsh-version;">
|
---|
[eab549f] | 19 | <?dbhtml filename="tcsh.html"?>
|
---|
| 20 |
|
---|
| 21 | <sect1info>
|
---|
| 22 | <othername>$LastChangedBy$</othername>
|
---|
| 23 | <date>$Date$</date>
|
---|
| 24 | </sect1info>
|
---|
| 25 |
|
---|
| 26 | <title>Tcsh-&tcsh-version;</title>
|
---|
| 27 |
|
---|
| 28 | <indexterm zone="tcsh">
|
---|
| 29 | <primary sortas="a-Tcsh">Tcsh</primary>
|
---|
| 30 | </indexterm>
|
---|
| 31 |
|
---|
| 32 | <sect2 role="package">
|
---|
| 33 | <title>Introduction to Tcsh</title>
|
---|
| 34 |
|
---|
[03ff511] | 35 | <para>The <application>Tcsh</application> package contains <quote>an
|
---|
| 36 | enhanced but completely compatible version of the Berkeley Unix C shell
|
---|
| 37 | (<command>csh</command>)</quote>. This is useful as an alternative shell
|
---|
| 38 | for those who prefer C syntax to that of the <command>bash</command> shell,
|
---|
[bccbdaea] | 39 | and also because some programs require the C shell in order to perform
|
---|
[03ff511] | 40 | installation tasks.</para>
|
---|
[fd7e0ed6] | 41 |
|
---|
[995a461b] | 42 | &lfs80_checked;
|
---|
[eab549f] | 43 |
|
---|
| 44 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 45 | <itemizedlist spacing="compact">
|
---|
| 46 | <listitem>
|
---|
| 47 | <para>Download (HTTP): <ulink url="&tcsh-download-http;"/></para>
|
---|
| 48 | </listitem>
|
---|
| 49 | <listitem>
|
---|
| 50 | <para>Download (FTP): <ulink url="&tcsh-download-ftp;"/></para>
|
---|
| 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
| 53 | <para>Download MD5 sum: &tcsh-md5sum;</para>
|
---|
| 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
| 56 | <para>Download size: &tcsh-size;</para>
|
---|
| 57 | </listitem>
|
---|
| 58 | <listitem>
|
---|
| 59 | <para>Estimated disk space required: &tcsh-buildsize;</para>
|
---|
| 60 | </listitem>
|
---|
| 61 | <listitem>
|
---|
| 62 | <para>Estimated build time: &tcsh-time;</para>
|
---|
| 63 | </listitem>
|
---|
| 64 | </itemizedlist>
|
---|
| 65 |
|
---|
[3597eb6] | 66 | <para condition="html" role="usernotes">User Notes:
|
---|
| 67 | <ulink url="&blfs-wiki;/tcsh"/></para>
|
---|
| 68 |
|
---|
[eab549f] | 69 | </sect2>
|
---|
| 70 |
|
---|
| 71 | <sect2 role="installation">
|
---|
| 72 | <title>Installation of Tcsh</title>
|
---|
| 73 |
|
---|
[59a6b63] | 74 | <para>
|
---|
[a72cdddf] | 75 | First, fix the package for tool chain changes:
|
---|
[59a6b63] | 76 | </para>
|
---|
| 77 |
|
---|
[53375fc] | 78 | <screen><userinput>sed -i 's|SVID_SOURCE|DEFAULT_SOURCE|g' config/linux &&
|
---|
| 79 | sed -i 's|BSD_SOURCE|DEFAULT_SOURCE|g' config/linux</userinput></screen>
|
---|
[59a6b63] | 80 |
|
---|
[eab549f] | 81 | <para>Install <application>Tcsh</application> by running the following
|
---|
| 82 | commands:</para>
|
---|
| 83 |
|
---|
[9d92eb7a] | 84 | <screen><userinput>./configure --prefix=/usr --bindir=/bin &&
|
---|
[59a6b63] | 85 |
|
---|
[2956bc0] | 86 | make &&
|
---|
| 87 | sh ./tcsh.man2html</userinput></screen>
|
---|
| 88 |
|
---|
[d5ee114] | 89 | <para>To test the results, issue: <command>make check</command>.</para>
|
---|
[eab549f] | 90 |
|
---|
| 91 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 92 |
|
---|
[f70c31f] | 93 | <screen role="root"><userinput>make install install.man &&
|
---|
[59a6b63] | 94 |
|
---|
[f70c31f] | 95 | ln -v -sf tcsh /bin/csh &&
|
---|
[4f7d19e] | 96 | ln -v -sf tcsh.1 /usr/share/man/man1/csh.1 &&
|
---|
[59a6b63] | 97 |
|
---|
[f1d3e56] | 98 | install -v -m755 -d /usr/share/doc/tcsh-&tcsh-version;/html &&
|
---|
[2956bc0] | 99 | install -v -m644 tcsh.html/* /usr/share/doc/tcsh-&tcsh-version;/html &&
|
---|
[f70c31f] | 100 | install -v -m644 FAQ /usr/share/doc/tcsh-&tcsh-version;</userinput></screen>
|
---|
[eab549f] | 101 |
|
---|
| 102 | </sect2>
|
---|
| 103 |
|
---|
| 104 | <sect2 role="commands">
|
---|
| 105 | <title>Command Explanations</title>
|
---|
[f45b1953] | 106 |
|
---|
[2956bc0] | 107 | <para><parameter>--bindir=/bin</parameter>: This installs the
|
---|
[4f7d19e] | 108 | <command>tcsh</command> program in <filename
|
---|
| 109 | class='directory'>/bin</filename> instead of <filename
|
---|
| 110 | class='directory'>/usr/bin</filename>.</para>
|
---|
[2956bc0] | 111 |
|
---|
| 112 | <para><command>sh ./tcsh.man2html</command>: This creates HTML documentation
|
---|
| 113 | from the formatted man page.</para>
|
---|
| 114 |
|
---|
| 115 | <para><command>ln -v -sf tcsh /bin/csh</command>: The FHS states that if
|
---|
| 116 | there is a <application>C</application> shell installed, there should be a
|
---|
[bccbdaea] | 117 | symlink from <filename>/bin/csh</filename> to it. This creates that
|
---|
[2956bc0] | 118 | symlink.</para>
|
---|
[eab549f] | 119 |
|
---|
| 120 | </sect2>
|
---|
| 121 |
|
---|
| 122 | <sect2 role="configuration">
|
---|
| 123 | <title>Configuring Tcsh</title>
|
---|
| 124 |
|
---|
| 125 | <sect3 id="tcsh-config">
|
---|
| 126 | <title>Config Files</title>
|
---|
| 127 |
|
---|
| 128 | <para>There are numerous configuration files for the C shell. Examples
|
---|
| 129 | of these are <filename>/etc/csh.cshrc</filename>,
|
---|
| 130 | <filename>/etc/csh.login</filename>, <filename>/etc/csh.logout</filename>,
|
---|
| 131 | <filename>~/.tcshrc</filename>, <filename>~/.cshrc</filename>,
|
---|
| 132 | <filename>~/.history</filename>, <filename>~/.cshdirs</filename>,
|
---|
| 133 | <filename>~/.login</filename>, and <filename>~/.logout</filename>. More
|
---|
| 134 | information on these files can be found in the
|
---|
| 135 | <filename>tcsh(1)</filename> man page.</para>
|
---|
| 136 |
|
---|
| 137 | <indexterm zone="tcsh tcsh-config">
|
---|
| 138 | <primary sortas="e-etc-csh.cshrc">/etc/csh.cshrc</primary>
|
---|
| 139 | </indexterm>
|
---|
| 140 |
|
---|
| 141 | <indexterm zone="tcsh tcsh-config">
|
---|
| 142 | <primary sortas="e-etc-csh.login">/etc/csh.login</primary>
|
---|
| 143 | </indexterm>
|
---|
| 144 |
|
---|
| 145 | <indexterm zone="tcsh tcsh-config">
|
---|
| 146 | <primary sortas="e-etc-csh.logout">/etc/csh.logout</primary>
|
---|
| 147 | </indexterm>
|
---|
| 148 |
|
---|
| 149 | <indexterm zone="tcsh tcsh-config">
|
---|
| 150 | <primary sortas="e-AA.tcshrc">~/.tcshrc</primary>
|
---|
| 151 | </indexterm>
|
---|
| 152 |
|
---|
| 153 | <indexterm zone="tcsh tcsh-config">
|
---|
| 154 | <primary sortas="e-AA.cshrc">~/.cshrc</primary>
|
---|
| 155 | </indexterm>
|
---|
| 156 |
|
---|
| 157 | <indexterm zone="tcsh tcsh-config">
|
---|
| 158 | <primary sortas="e-AA.history">~/.history</primary>
|
---|
| 159 | </indexterm>
|
---|
| 160 |
|
---|
| 161 | <indexterm zone="tcsh tcsh-config">
|
---|
| 162 | <primary sortas="e-AA.cshdirs">~/.cshdirs</primary>
|
---|
| 163 | </indexterm>
|
---|
[42e6981] | 164 |
|
---|
[eab549f] | 165 | <indexterm zone="tcsh tcsh-config">
|
---|
| 166 | <primary sortas="e-AA.login">~/.login</primary>
|
---|
| 167 | </indexterm>
|
---|
| 168 |
|
---|
| 169 | <indexterm zone="tcsh tcsh-config">
|
---|
| 170 | <primary sortas="e-AA.logout">~/.logout</primary>
|
---|
| 171 | </indexterm>
|
---|
| 172 |
|
---|
| 173 | </sect3>
|
---|
| 174 |
|
---|
[2956bc0] | 175 | <sect3>
|
---|
| 176 | <title>Configuration Information</title>
|
---|
| 177 |
|
---|
| 178 | <para>Update <filename>/etc/shells</filename> to include the C shell
|
---|
[bccbdaea] | 179 | program names (as the <systemitem class="username">root</systemitem>
|
---|
[03ff511] | 180 | user):</para>
|
---|
[2956bc0] | 181 |
|
---|
| 182 | <screen role="root"><userinput>cat >> /etc/shells << "EOF"
|
---|
| 183 | <literal>/bin/tcsh
|
---|
| 184 | /bin/csh</literal>
|
---|
[59a6b63] | 185 | EOF</userinput></screen>
|
---|
| 186 |
|
---|
| 187 | <para>
|
---|
| 188 | The following <filename>~/.cshrc</filename> provides two alternative
|
---|
| 189 | colour prompts and coloured <command>ls</command> output. If you prefer
|
---|
| 190 | a global modification, issue the command as the <systemitem
|
---|
| 191 | class="username">root</systemitem> user, replacing
|
---|
| 192 | <filename>~/.cshrc</filename> by <filename>/etc/csh.cshrc</filename>.
|
---|
| 193 | </para>
|
---|
| 194 |
|
---|
| 195 | <screen><userinput>cat > ~/.cshrc << "EOF"
|
---|
| 196 | <literal># Original at:
|
---|
| 197 | # https://www.cs.umd.edu/~srhuang/teaching/code_snippets/prompt_color.tcsh.html
|
---|
| 198 |
|
---|
[077d95b] | 199 | # Modified by the BLFS Development Team.
|
---|
[59a6b63] | 200 |
|
---|
| 201 | # Add these lines to your ~/.cshrc (or to /etc/csh.cshrc).
|
---|
| 202 |
|
---|
| 203 | # Colors!
|
---|
| 204 | set red="%{\033[1;31m%}"
|
---|
| 205 | set green="%{\033[0;32m%}"
|
---|
| 206 | set yellow="%{\033[1;33m%}"
|
---|
| 207 | set blue="%{\033[1;34m%}"
|
---|
| 208 | set magenta="%{\033[1;35m%}"
|
---|
| 209 | set cyan="%{\033[1;36m%}"
|
---|
| 210 | set white="%{\033[0;37m%}"
|
---|
| 211 | set end="%{\033[0m%}" # This is needed at the end...
|
---|
| 212 |
|
---|
| 213 | # Setting the actual prompt. Two separate versions for you to try, pick
|
---|
| 214 | # whichever one you like better, and change the colors as you want.
|
---|
| 215 | # Just don't mess with the ${end} guy in either line... Comment out or
|
---|
| 216 | # delete the prompt you don't use.
|
---|
| 217 |
|
---|
| 218 | set prompt="${green}%n${blue}@%m ${white}%~ ${green}%%${end} "
|
---|
| 219 | set prompt="[${green}%n${blue}@%m ${white}%~ ]${end} "
|
---|
| 220 |
|
---|
| 221 | # This was not in the original URL above
|
---|
| 222 | # Provides coloured ls
|
---|
| 223 | alias ls ls --color=always
|
---|
| 224 |
|
---|
| 225 | # Clean up after ourselves...
|
---|
| 226 | unset red green yellow blue magenta cyan yellow white end</literal>
|
---|
[2956bc0] | 227 | EOF</userinput></screen>
|
---|
| 228 |
|
---|
| 229 | </sect3>
|
---|
| 230 |
|
---|
[eab549f] | 231 | </sect2>
|
---|
| 232 |
|
---|
| 233 | <sect2 role="content">
|
---|
| 234 | <title>Contents</title>
|
---|
| 235 |
|
---|
| 236 | <segmentedlist>
|
---|
| 237 | <segtitle>Installed Program</segtitle>
|
---|
| 238 | <segtitle>Installed Libraries</segtitle>
|
---|
[2956bc0] | 239 | <segtitle>Installed Directory</segtitle>
|
---|
[eab549f] | 240 |
|
---|
| 241 | <seglistitem>
|
---|
| 242 | <seg>tcsh</seg>
|
---|
| 243 | <seg>None</seg>
|
---|
[2956bc0] | 244 | <seg>/usr/share/doc/tcsh-&tcsh-version;</seg>
|
---|
[eab549f] | 245 | </seglistitem>
|
---|
| 246 | </segmentedlist>
|
---|
| 247 |
|
---|
| 248 | <variablelist>
|
---|
| 249 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 250 | <?dbfo list-presentation="list"?>
|
---|
| 251 | <?dbhtml list-presentation="table"?>
|
---|
| 252 |
|
---|
| 253 | <varlistentry id="tcsh-prog">
|
---|
| 254 | <term><command>tcsh</command></term>
|
---|
| 255 | <listitem>
|
---|
| 256 | <para>is an enhanced but completely compatible version of the
|
---|
| 257 | Berkeley Unix C shell, <command>csh</command>. It is usable as both an
|
---|
| 258 | interactive shell and a script processor.</para>
|
---|
| 259 | <indexterm zone="tcsh tcsh-prog">
|
---|
| 260 | <primary sortas="b-tcsh">tcsh</primary>
|
---|
| 261 | </indexterm>
|
---|
| 262 | </listitem>
|
---|
| 263 | </varlistentry>
|
---|
| 264 | </variablelist>
|
---|
| 265 |
|
---|
| 266 | </sect2>
|
---|
| 267 |
|
---|
| 268 | </sect1>
|
---|