glfs/postlfs/shells/tcsh.xml
Fernando de Oliveira 077d95b820 • Tcsh-6.19.00: typo.
•  MariaDB-10.0.21 and SDL-1.2.15: Fix dead URLs.


git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@16334 af4574ff-66df-0310-9fd7-8a98e5e911e0
2015-08-08 17:06:40 +00:00

275 lines
9.0 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!-- Following URL does not have previous versions
<!ENTITY tcsh-download-http "http://www.sfr-fresh.com/unix/misc/tcsh-&tcsh-version;.tar.gz">-->
<!-- Following URL does have previous versions -->
<!ENTITY tcsh-download-http "http://fossies.org/linux/misc/tcsh-&tcsh-version;.tar.gz">
<!ENTITY tcsh-download-ftp "ftp://ftp.astron.com/pub/tcsh/tcsh-&tcsh-version;.tar.gz">
<!ENTITY tcsh-md5sum "f5f854833578647795bc906dd4bcb5d5">
<!ENTITY tcsh-size "928 KB">
<!ENTITY tcsh-buildsize "15 MB (with tests)">
<!ENTITY tcsh-time "0.2 SBU (with tests)">
]>
<sect1 id="tcsh" xreflabel="Tcsh-&tcsh-version;">
<?dbhtml filename="tcsh.html"?>
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<title>Tcsh-&tcsh-version;</title>
<indexterm zone="tcsh">
<primary sortas="a-Tcsh">Tcsh</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to Tcsh</title>
<para>The <application>Tcsh</application> package contains <quote>an
enhanced but completely compatible version of the Berkeley Unix C shell
(<command>csh</command>)</quote>. This is useful as an alternative shell
for those who prefer C syntax to that of the <command>bash</command> shell,
and also because some programs require the C shell in order to perform
installation tasks.</para>
&lfs77_checked; &gcc5_checked;
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>Download (HTTP): <ulink url="&tcsh-download-http;"/></para>
</listitem>
<listitem>
<para>Download (FTP): <ulink url="&tcsh-download-ftp;"/></para>
</listitem>
<listitem>
<para>Download MD5 sum: &tcsh-md5sum;</para>
</listitem>
<listitem>
<para>Download size: &tcsh-size;</para>
</listitem>
<listitem>
<para>Estimated disk space required: &tcsh-buildsize;</para>
</listitem>
<listitem>
<para>Estimated build time: &tcsh-time;</para>
</listitem>
</itemizedlist>
<para condition="html" role="usernotes">User Notes:
<ulink url="&blfs-wiki;/tcsh"/></para>
</sect2>
<sect2 role="installation">
<title>Installation of Tcsh</title>
<para>
First, fix the package for gcc5 optimizations:
</para>
<screen><userinput>sed -e 's/ i)/ k)/' \
-e '/ k)/ i \ k = i;' \
-e '/\*cp/ a \ volatile size_t k;' \
-i tc.alloc.c</userinput></screen>
<para>Install <application>Tcsh</application> by running the following
commands:</para>
<screen><userinput>sed -i 's|fR/g|&amp;m|' tcsh.man2html &amp;&amp;
./configure --prefix=/usr --bindir=/bin &amp;&amp;
make &amp;&amp;
sh ./tcsh.man2html</userinput></screen>
<para>To test the results, issue: <command>make check</command>.</para>
<para>Now, as the <systemitem class="username">root</systemitem> user:</para>
<screen role="root"><userinput>make install install.man &amp;&amp;
ln -v -sf tcsh /bin/csh &amp;&amp;
ln -v -sf tcsh.1 /usr/share/man/man1/csh.1 &amp;&amp;
install -v -m755 -d /usr/share/doc/tcsh-&tcsh-version;/html &amp;&amp;
install -v -m644 tcsh.html/* /usr/share/doc/tcsh-&tcsh-version;/html &amp;&amp;
install -v -m644 FAQ /usr/share/doc/tcsh-&tcsh-version;</userinput></screen>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<para><command>sed -i 's|fR/g|&amp;m|' tcsh.man2html</command>:
This updates some deprecated Perl code.</para>
<para><parameter>--bindir=/bin</parameter>: This installs the
<command>tcsh</command> program in <filename
class='directory'>/bin</filename> instead of <filename
class='directory'>/usr/bin</filename>.</para>
<para><command>sh ./tcsh.man2html</command>: This creates HTML documentation
from the formatted man page.</para>
<para><command>ln -v -sf tcsh /bin/csh</command>: The FHS states that if
there is a <application>C</application> shell installed, there should be a
symlink from <filename>/bin/csh</filename> to it. This creates that
symlink.</para>
</sect2>
<sect2 role="configuration">
<title>Configuring Tcsh</title>
<sect3 id="tcsh-config">
<title>Config Files</title>
<para>There are numerous configuration files for the C shell. Examples
of these are <filename>/etc/csh.cshrc</filename>,
<filename>/etc/csh.login</filename>, <filename>/etc/csh.logout</filename>,
<filename>~/.tcshrc</filename>, <filename>~/.cshrc</filename>,
<filename>~/.history</filename>, <filename>~/.cshdirs</filename>,
<filename>~/.login</filename>, and <filename>~/.logout</filename>. More
information on these files can be found in the
<filename>tcsh(1)</filename> man page.</para>
<indexterm zone="tcsh tcsh-config">
<primary sortas="e-etc-csh.cshrc">/etc/csh.cshrc</primary>
</indexterm>
<indexterm zone="tcsh tcsh-config">
<primary sortas="e-etc-csh.login">/etc/csh.login</primary>
</indexterm>
<indexterm zone="tcsh tcsh-config">
<primary sortas="e-etc-csh.logout">/etc/csh.logout</primary>
</indexterm>
<indexterm zone="tcsh tcsh-config">
<primary sortas="e-AA.tcshrc">~/.tcshrc</primary>
</indexterm>
<indexterm zone="tcsh tcsh-config">
<primary sortas="e-AA.cshrc">~/.cshrc</primary>
</indexterm>
<indexterm zone="tcsh tcsh-config">
<primary sortas="e-AA.history">~/.history</primary>
</indexterm>
<indexterm zone="tcsh tcsh-config">
<primary sortas="e-AA.cshdirs">~/.cshdirs</primary>
</indexterm>
<indexterm zone="tcsh tcsh-config">
<primary sortas="e-AA.login">~/.login</primary>
</indexterm>
<indexterm zone="tcsh tcsh-config">
<primary sortas="e-AA.logout">~/.logout</primary>
</indexterm>
</sect3>
<sect3>
<title>Configuration Information</title>
<para>Update <filename>/etc/shells</filename> to include the C shell
program names (as the <systemitem class="username">root</systemitem>
user):</para>
<screen role="root"><userinput>cat &gt;&gt; /etc/shells &lt;&lt; "EOF"
<literal>/bin/tcsh
/bin/csh</literal>
EOF</userinput></screen>
<para>
The following <filename>~/.cshrc</filename> provides two alternative
colour prompts and coloured <command>ls</command> output. If you prefer
a global modification, issue the command as the <systemitem
class="username">root</systemitem> user, replacing
<filename>~/.cshrc</filename> by <filename>/etc/csh.cshrc</filename>.
</para>
<screen><userinput>cat &gt; ~/.cshrc &lt;&lt; "EOF"
<literal># Original at:
# https://www.cs.umd.edu/~srhuang/teaching/code_snippets/prompt_color.tcsh.html
# Modified by the BLFS Development Team.
# Add these lines to your ~/.cshrc (or to /etc/csh.cshrc).
# Colors!
set red="%{\033[1;31m%}"
set green="%{\033[0;32m%}"
set yellow="%{\033[1;33m%}"
set blue="%{\033[1;34m%}"
set magenta="%{\033[1;35m%}"
set cyan="%{\033[1;36m%}"
set white="%{\033[0;37m%}"
set end="%{\033[0m%}" # This is needed at the end...
# Setting the actual prompt. Two separate versions for you to try, pick
# whichever one you like better, and change the colors as you want.
# Just don't mess with the ${end} guy in either line... Comment out or
# delete the prompt you don't use.
set prompt="${green}%n${blue}@%m ${white}%~ ${green}%%${end} "
set prompt="[${green}%n${blue}@%m ${white}%~ ]${end} "
# This was not in the original URL above
# Provides coloured ls
alias ls ls --color=always
# Clean up after ourselves...
unset red green yellow blue magenta cyan yellow white end</literal>
EOF</userinput></screen>
</sect3>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Program</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directory</segtitle>
<seglistitem>
<seg>tcsh</seg>
<seg>None</seg>
<seg>/usr/share/doc/tcsh-&tcsh-version;</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="tcsh-prog">
<term><command>tcsh</command></term>
<listitem>
<para>is an enhanced but completely compatible version of the
Berkeley Unix C shell, <command>csh</command>. It is usable as both an
interactive shell and a script processor.</para>
<indexterm zone="tcsh tcsh-prog">
<primary sortas="b-tcsh">tcsh</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>