glfs/postlfs/shells/zsh.xml
Xi Ruoyao 4f4e7f18af
zsh: enable libcap and gdbm
They are already in LFS so there is no significant reason not to use
them.  Using gdbm may cause license issue but AFAIK as long as we don't
edit gdbm or zsh code in a hidden way we'll not violate the license.

And zsh does not use pam_cap (or any PAM module) at all.  Perhaps we
should perform a cleanup on pam_cap dependencies.
2022-06-11 15:52:51 +08:00

345 lines
11 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 "https://www.zsh.org/pub/zsh-&zsh-version;.tar.xz">
<!ENTITY zsh-download-ftp " ">
<!ENTITY zsh-md5sum "182e37ca3fe3fa6a44f69ad462c5c30e">
<!ENTITY zsh-size "3.2 MB">
<!ENTITY zsh-buildsize "48 MB (includes documentation and tests)">
<!ENTITY zsh-time "1.6 SBU (Using parallelism=4; includes documentation and tests)">
<!ENTITY zsh-doc-md5sum "8db53446f613521fb4f9b0bd9f6adda1">
<!ENTITY zsh-doc-size "3.0 MB">
]>
<sect1 id="zsh" xreflabel="zsh-&zsh-version;">
<?dbhtml filename="zsh.html"?>
<sect1info>
<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>
&lfs111_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="https://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="https://www.zsh.org/pub/old/"/>.
</para>
</note>
<bridgehead renderas="sect3">zsh Dependencies</bridgehead>
<bridgehead renderas="sect4">Optional</bridgehead>
<para role="optional">
<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 \
--sysconfdir=/etc/zsh \
--enable-etcdir=/etc/zsh \
--enable-cap \
--enable-gdbm &amp;&amp;
make &amp;&amp;
makeinfo Doc/zsh.texi --plaintext -o Doc/zsh.txt &amp;&amp;
makeinfo Doc/zsh.texi --html -o Doc/html &amp;&amp;
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 remap="doc"><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 &amp;&amp;
make infodir=/usr/share/info install.info &amp;&amp;
install -v -m755 -d /usr/share/doc/zsh-&zsh-version;/html &amp;&amp;
install -v -m644 Doc/html/* /usr/share/doc/zsh-&zsh-version;/html &amp;&amp;
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 &amp;&amp;
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"
remap="doc"><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>--enable-cap</parameter>: This option enables
POSIX capabilities.
</para>
<para>
<parameter>--enable-gdbm</parameter>: This option enables 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>
</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>&lt;prompt-name&gt;</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 &gt;&gt; /etc/shells &lt;&lt; "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>