mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-24 23:32:12 +08:00
3ee805c877
Update to nano-2.8.7. git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@19120 af4574ff-66df-0310-9fd7-8a98e5e911e0
329 lines
12 KiB
XML
329 lines
12 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;
|
|
|
|
<!ENTITY zsh-download-http "http://www.zsh.org/pub/zsh-&zsh-version;.tar.gz">
|
|
<!ENTITY zsh-download-ftp " ">
|
|
<!ENTITY zsh-md5sum "">
|
|
<!ENTITY zsh-size "4,3 MB">
|
|
<!ENTITY zsh-buildsize "44 MB (includes documentation and tests)">
|
|
<!ENTITY zsh-time "1.0 SBU (includes documentation and tests)">
|
|
|
|
<!ENTITY zsh-doc-md5sum "e718bbcd663992ba33c01d4f8a289fc5">
|
|
<!ENTITY zsh-doc-size "3.1 MB">
|
|
]>
|
|
|
|
<sect1 id="zsh" xreflabel="zsh-&zsh-version;">
|
|
<?dbhtml filename="zsh.html"?>
|
|
|
|
<sect1info>
|
|
<othername>$LastChangedBy$</othername>
|
|
<date>$Date$</date>
|
|
</sect1info>
|
|
|
|
<title>zsh-&zsh-version;</title>
|
|
|
|
<indexterm zone="zsh">
|
|
<primary sortas="a-zsh">zsh</primary>
|
|
</indexterm>
|
|
|
|
<sect2 role="package">
|
|
<title>Introduction to zsh</title>
|
|
|
|
<para>The <application>zsh</application> package contains a command
|
|
interpreter (shell) usable as an interactive login shell and as
|
|
a shell script command processor. Of the standard shells,
|
|
<application>zsh</application> most closely resembles
|
|
<application>ksh</application> but includes many enhancements.</para>
|
|
|
|
&lfs81_checked;
|
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
<itemizedlist spacing="compact">
|
|
<listitem>
|
|
<para>Download (HTTP): <ulink url="&zsh-download-http;"/></para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Download (FTP): <ulink url="&zsh-download-ftp;"/></para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Download MD5 sum: &zsh-md5sum;</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Download size: &zsh-size;</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Estimated disk space required: &zsh-buildsize;</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Estimated build time: &zsh-time;</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
|
<itemizedlist spacing="compact">
|
|
<listitem>
|
|
<para>Optional Documentation: <ulink
|
|
url="http://www.zsh.org/pub/zsh-&zsh-version;-doc.tar.xz"/></para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Documentation MD5 sum: &zsh-doc-md5sum;</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Documentation download size: &zsh-doc-size;</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<note>
|
|
<para>
|
|
When there is a new <application>zsh</application> release, the old
|
|
files shown above are moved to a new server directory:
|
|
<ulink url="http://www.zsh.org/pub/old/"/>.
|
|
</para>
|
|
</note>
|
|
|
|
<bridgehead renderas="sect3">zsh Dependencies</bridgehead>
|
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
<para role="optional">
|
|
<xref linkend="libcap-pam"/>,
|
|
<xref linkend="pcre"/>, and
|
|
<xref linkend="valgrind"/>,
|
|
</para>
|
|
|
|
<para condition="html" role="usernotes">User Notes:
|
|
<ulink url="&blfs-wiki;/zsh"/></para>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="installation">
|
|
<title>Installation of zsh</title>
|
|
|
|
<para>If you downloaded the optional documentation, unpack it with
|
|
the following command:</para>
|
|
|
|
<screen><userinput>tar --strip-components=1 -xvf ../zsh-&zsh-version;-doc.tar.xz</userinput></screen>
|
|
|
|
<!-- <note>
|
|
<para>
|
|
Using a script to build with "su -c script" may produce a funny
|
|
configure error message: "no controlling tty". If this happens, add
|
|
the switch -\-with-tcsetpgrp to configure.
|
|
</para>
|
|
</note>
|
|
-->
|
|
<para>Install <application>zsh</application> by running the following
|
|
commands:</para>
|
|
|
|
<screen><userinput>./configure --prefix=/usr \
|
|
--bindir=/bin \
|
|
--sysconfdir=/etc/zsh \
|
|
--enable-etcdir=/etc/zsh &&
|
|
make &&
|
|
|
|
makeinfo Doc/zsh.texi --plaintext -o Doc/zsh.txt &&
|
|
makeinfo Doc/zsh.texi --html -o Doc/html &&
|
|
makeinfo Doc/zsh.texi --html --no-split --no-headers -o Doc/zsh.html</userinput></screen>
|
|
|
|
<para>If you have <xref linkend="texlive"/>
|
|
installed, you can build PDF format of the documentation by issuing
|
|
the following command:</para>
|
|
|
|
<screen><userinput>texi2pdf Doc/zsh.texi -o Doc/zsh.pdf</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 &&
|
|
make infodir=/usr/share/info install.info &&
|
|
|
|
install -v -m755 -d /usr/share/doc/zsh-&zsh-version;/html &&
|
|
install -v -m644 Doc/html/* /usr/share/doc/zsh-&zsh-version;/html &&
|
|
install -v -m644 Doc/zsh.{html,txt} /usr/share/doc/zsh-&zsh-version;</userinput></screen>
|
|
|
|
<para>If you downloaded the optional documentation, install it by issuing
|
|
the following commands as the
|
|
<systemitem class="username">root</systemitem> user:</para>
|
|
|
|
<screen role="root"><userinput>make htmldir=/usr/share/doc/zsh-&zsh-version;/html install.html &&
|
|
install -v -m644 Doc/zsh.dvi /usr/share/doc/zsh-&zsh-version;</userinput></screen>
|
|
|
|
<para>If you built the PDF format of the documentation, install
|
|
it by issuing the following command as the
|
|
<systemitem class="username">root</systemitem> user:</para>
|
|
|
|
<screen role="root"><userinput>install -v -m644 Doc/zsh.pdf /usr/share/doc/zsh-&zsh-version;</userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="commands">
|
|
<title>Command Explanations</title>
|
|
|
|
<para><parameter>--sysconfdir=/etc/zsh</parameter> and
|
|
<parameter>--enable-etcdir=/etc/zsh</parameter>: These parameters are
|
|
used so that all the <application>zsh</application> configuration files
|
|
are consolidated into the <filename class='directory'>/etc/zsh</filename>
|
|
directory. Omit these parameters if you wish to retain historical
|
|
compatibility by having all the files located in the
|
|
<filename class='directory'>/etc</filename> directory.</para>
|
|
|
|
<para><parameter>--bindir=/bin</parameter>: This parameter places the
|
|
<command>zsh</command> binaries into the root filesystem.</para>
|
|
|
|
<para><option>--enable-cap</option>: This option enables
|
|
POSIX capabilities.</para>
|
|
|
|
<para><option>--disable-gdbm</option>: This option disables the
|
|
use of the <application>GDBM</application> library.</para>
|
|
|
|
<para><option>--enable-pcre</option>: This option allows zsh to use
|
|
the <application>PCRE</application> regular expression library in shell
|
|
builtins.</para>
|
|
|
|
<sect3 id="mountpoints">
|
|
<title>Multiple partitions</title>
|
|
|
|
<para>Linking <application>zsh</application> dynamically against
|
|
<application>pcre</application> and/or <application>gdbm</application>
|
|
produces runtime dependencies on <filename class='libraryfile'>
|
|
libpcre.so</filename> and/or <filename class='libraryfile'>libgdbm.so
|
|
</filename>respectively, which both reside in
|
|
<filename class='directory'>/usr</filename> hierarchy. If
|
|
<filename class='directory'>/usr</filename> is a separate mount point
|
|
and <application>zsh</application> needs to be available in boot time,
|
|
then its supporting libraries should be in
|
|
<filename class='directory'>/lib</filename> too. You can move the
|
|
libraries as follows:</para>
|
|
|
|
<screen role="root"><userinput>mv -v /usr/lib/libpcre.so.* /lib &&
|
|
ln -v -sf ../../lib/libpcre.so.0 /usr/lib/libpcre.so
|
|
|
|
mv -v /usr/lib/libgdbm.so.* /lib &&
|
|
ln -v -sf ../../lib/libgdbm.so.3 /usr/lib/libgdbm.so</userinput>
|
|
</screen>
|
|
|
|
<para>Alternatively you can statically link <application>zsh</application>
|
|
against <application>pcre</application> and <application>gdbm</application>
|
|
if you modify the <filename>config.modules</filename> file (you need first
|
|
to run configure to generate it).</para>
|
|
|
|
</sect3>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="configuration">
|
|
<title>Configuring zsh</title>
|
|
|
|
<sect3 id="zsh-config">
|
|
<title>Config Files</title>
|
|
|
|
<para>There are a whole host of configuration files for
|
|
<application>zsh</application> including
|
|
<filename>/etc/zsh/zshenv</filename>,
|
|
<filename>/etc/zsh/zprofile</filename>,
|
|
<filename>/etc/zsh/zshrc</filename>,
|
|
<filename>/etc/zsh/zlogin</filename> and
|
|
<filename>/etc/zsh/zlogout</filename>.
|
|
You can find more information on these in the <filename>zsh(1)</filename>
|
|
and related manual pages.</para>
|
|
|
|
<para>
|
|
The first time zsh is executed, you will be prompted by messages asking
|
|
several questions. The answers will be used to create a
|
|
<filename>~/.zshrc</filename> file. If you wish to run these questions
|
|
again, run <command>zsh
|
|
/usr/share/zsh/&zsh-version;/functions/zsh-newuser-install -f</command>.
|
|
</para>
|
|
|
|
<para>
|
|
There are several built-in advanced prompts. In the
|
|
<command>zsh</command> shell, start advanced prompt support with
|
|
<command>autoload -U promptinit</command>, then
|
|
<command>promptinit</command>. Available prompt names are listed with
|
|
<command>prompt -l</command>. Select a particular one with
|
|
<command>prompt <literal><prompt-name></literal></command>. Display all available
|
|
prompts with <command>prompt -p</command>. Except for the list and
|
|
display commands above, you can insert the other ones in
|
|
<filename>~/.zshrc</filename> to be automatically executed at
|
|
shell start, with the prompt you chose.
|
|
</para>
|
|
|
|
<indexterm zone="zsh zsh-config">
|
|
<primary sortas="e-etc-zsh-zshenv">/etc/zsh/zshenv</primary>
|
|
</indexterm>
|
|
|
|
<indexterm zone="zsh zsh-config">
|
|
<primary sortas="e-etc-zsh-zprofile">/etc/zsh/zprofile</primary>
|
|
</indexterm>
|
|
|
|
<indexterm zone="zsh zsh-config">
|
|
<primary sortas="e-etc-zsh-zshrc">/etc/zsh/zshrc</primary>
|
|
</indexterm>
|
|
|
|
<indexterm zone="zsh zsh-config">
|
|
<primary sortas="e-etc-zsh-zlogin">/etc/zsh/zlogin</primary>
|
|
</indexterm>
|
|
|
|
<indexterm zone="zsh zsh-config">
|
|
<primary sortas="e-etc-zsh-zlogout">/etc/zsh/zlogout</primary>
|
|
</indexterm>
|
|
|
|
</sect3>
|
|
|
|
<sect3>
|
|
<title>Configuration Information</title>
|
|
|
|
<para>Update <filename>/etc/shells</filename> to include the
|
|
<application>zsh</application> shell program names (as the
|
|
<systemitem class="username">root</systemitem> user):</para>
|
|
|
|
<screen role="root"><userinput>cat >> /etc/shells << "EOF"
|
|
<literal>/bin/zsh</literal>
|
|
EOF</userinput></screen>
|
|
|
|
</sect3>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="content">
|
|
<title>Contents</title>
|
|
|
|
<segmentedlist>
|
|
<segtitle>Installed Programs</segtitle>
|
|
<segtitle>Installed Libraries</segtitle>
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
<seglistitem>
|
|
<seg>zsh and zsh-&zsh-version; (hardlinked to each other)</seg>
|
|
<seg>Numerous plugin helper modules under
|
|
/usr/lib/zsh/&zsh-version;/</seg>
|
|
<seg>/usr/{lib,share}/zsh and /usr/share/doc/zsh-&zsh-version;</seg>
|
|
</seglistitem>
|
|
</segmentedlist>
|
|
|
|
<variablelist>
|
|
<bridgehead renderas="sect3">Short Description</bridgehead>
|
|
<?dbfo list-presentation="list"?>
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
<varlistentry id="zsh-prog">
|
|
<term><command>zsh</command></term>
|
|
<listitem>
|
|
<para>is a shell which has command-line editing, built-in spelling
|
|
correction, programmable command completion, shell functions (with
|
|
autoloading), a history mechanism, and a host of other features.</para>
|
|
<indexterm zone="zsh zsh-prog">
|
|
<primary sortas="b-zsh">zsh</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|