source: postlfs/shells/zsh.xml@ 8525524b

12.1 12.2 gimp3 ken/TL2024 lazarus plabs/newcss rahul/power-profiles-daemon trunk xry111/for-12.3 xry111/llvm18 xry111/spidermonkey128
Last change on this file since 8525524b was 7299d5e, checked in by Xi Ruoyao <xry111@…>, 9 months ago

zsh: Clean up documentation build and install instruction

The so-called "optional documentation" actually contains nothing more
than the HTML documentations generated by makeinfo --html. So just stop
downloading it.

A change in texinfo-7.0 has actually break makeinfo --html of zsh, but
the issue was hidden due to the inclusion of the "optional
documentation". Use a sed to correct it.

Do not put zsh.txt and zsh.html info the Doc directory, or they'll be
installed to /usr/share/doc/zsh-5.9/html by make install.html.

Also install the FAQ of zsh.

  • Property mode set to 100644
File size: 9.8 KB
RevLine 
[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
[c6b192c]7 <!ENTITY zsh-download-http "https://www.zsh.org/pub/zsh-&zsh-version;.tar.xz">
[8070ffce]8 <!ENTITY zsh-download-ftp " ">
[06333e6]9 <!ENTITY zsh-md5sum "182e37ca3fe3fa6a44f69ad462c5c30e">
10 <!ENTITY zsh-size "3.2 MB">
11 <!ENTITY zsh-buildsize "48 MB (includes documentation and tests)">
12 <!ENTITY zsh-time "1.6 SBU (Using parallelism=4; includes documentation and tests)">
[6eff6e1]13
[06333e6]14 <!ENTITY zsh-doc-md5sum "8db53446f613521fb4f9b0bd9f6adda1">
[fccc8d97]15 <!ENTITY zsh-doc-size "3.0 MB">
[44f085a]16]>
17
[f17b2db]18<sect1 id="zsh" xreflabel="zsh-&zsh-version;">
[a6a160b]19 <?dbhtml filename="zsh.html"?>
[f45b1953]20
[a6a160b]21
[f17b2db]22 <title>zsh-&zsh-version;</title>
[a6a160b]23
24 <indexterm zone="zsh">
[f17b2db]25 <primary sortas="a-zsh">zsh</primary>
[a6a160b]26 </indexterm>
27
28 <sect2 role="package">
[f17b2db]29 <title>Introduction to zsh</title>
[a6a160b]30
[f716ef4]31 <para>
32 The <application>zsh</application> package contains a command
33 interpreter (shell) usable as an interactive login shell and as
34 a shell script command processor. Of the standard shells,
35 <application>zsh</application> most closely resembles
36 <application>ksh</application> but includes many enhancements.
37 </para>
[a6a160b]38
[fbd04125]39 &lfs120_checked;
[6eff6e1]40
[a6a160b]41 <bridgehead renderas="sect3">Package Information</bridgehead>
42 <itemizedlist spacing="compact">
43 <listitem>
[f716ef4]44 <para>
45 Download (HTTP): <ulink url="&zsh-download-http;"/>
46 </para>
[a6a160b]47 </listitem>
48 <listitem>
[f716ef4]49 <para>
50 Download (FTP): <ulink url="&zsh-download-ftp;"/>
51 </para>
[a6a160b]52 </listitem>
53 <listitem>
[f716ef4]54 <para>
55 Download MD5 sum: &zsh-md5sum;
56 </para>
[a6a160b]57 </listitem>
58 <listitem>
[f716ef4]59 <para>
60 Download size: &zsh-size;
61 </para>
[a6a160b]62 </listitem>
63 <listitem>
[f716ef4]64 <para>
65 Estimated disk space required: &zsh-buildsize;
66 </para>
[a6a160b]67 </listitem>
68 <listitem>
[f716ef4]69 <para>
70 Estimated build time: &zsh-time;
71 </para>
[a6a160b]72 </listitem>
73 </itemizedlist>
74
[1590eb9]75 <note>
76 <para>
77 When there is a new <application>zsh</application> release, the old
78 files shown above are moved to a new server directory:
[c6b192c]79 <ulink url="https://www.zsh.org/pub/old/"/>.
[1590eb9]80 </para>
81 </note>
82
[f17b2db]83 <bridgehead renderas="sect3">zsh Dependencies</bridgehead>
[a6a160b]84
85 <bridgehead renderas="sect4">Optional</bridgehead>
[ca17955]86 <para role="optional">
[4f4e7f18]87 <xref linkend="pcre"/> and
[36357196]88 <xref linkend="valgrind"/>
[fcf4b970]89 </para>
[a6a160b]90
91 </sect2>
92
93 <sect2 role="installation">
[f17b2db]94 <title>Installation of zsh</title>
[a6a160b]95
[f716ef4]96 <para>
[7299d5e]97 Adapt the documentation build system for texinfo-7.0 or later:
[f716ef4]98 </para>
[98078a63]99
[7299d5e]100<screen><userinput>sed -e 's/set_from_init_file/texinfo_&amp;/' \
101 -i Doc/Makefile.in</userinput></screen>
[6eff6e1]102
[8f1fc267]103<!-- <note>
[37b6e78]104 <para>
105 Using a script to build with "su -c script" may produce a funny
106 configure error message: "no controlling tty". If this happens, add
[8f1fc267]107 the switch -\-with-tcsetpgrp to configure.
[37b6e78]108 </para>
109 </note>
[8f1fc267]110-->
[f716ef4]111 <para>
112 Install <application>zsh</application> by running the following
113 commands:
114 </para>
[a6a160b]115
[4f4e7f18]116<screen><userinput>./configure --prefix=/usr \
117 --sysconfdir=/etc/zsh \
118 --enable-etcdir=/etc/zsh \
119 --enable-cap \
[7299d5e]120 --enable-gdbm &amp;&amp;
121make &amp;&amp;
[a6a160b]122
[7299d5e]123makeinfo Doc/zsh.texi --html -o Doc/html &amp;&amp;
124makeinfo Doc/zsh.texi --plaintext -o zsh.txt &amp;&amp;
125makeinfo Doc/zsh.texi --html --no-split --no-headers -o zsh.html</userinput></screen>
[6eff6e1]126
[f716ef4]127 <para>
128 If you have <xref linkend="texlive"/>
129 installed, you can build PDF format of the documentation by issuing
130 the following command:
131 </para>
[f1e103a]132
[06908bf6]133<screen remap="doc"><userinput>texi2pdf Doc/zsh.texi -o Doc/zsh.pdf</userinput></screen>
[f1e103a]134
[f716ef4]135 <para>
136 To test the results, issue: <command>make check</command>.
137 </para>
[5ef8b741]138
[f716ef4]139 <para>
140 Now, as the <systemitem class="username">root</systemitem> user:
141 </para>
[a6a160b]142
[7299d5e]143<screen role="root"><userinput>make install &amp;&amp;
144make infodir=/usr/share/info install.info &amp;&amp;
145make htmldir=/usr/share/doc/zsh-&zsh-version;/html install.html &amp;&amp;
146install -v -m644 zsh.{html,txt} Etc/FAQ /usr/share/doc/zsh-&zsh-version;</userinput></screen>
[6eff6e1]147
[f716ef4]148 <para>
149 If you built the PDF format of the documentation, install
150 it by issuing the following command as the
151 <systemitem class="username">root</systemitem> user:
152 </para>
[6eff6e1]153
[06908bf6]154<screen role="root"
155 remap="doc"><userinput>install -v -m644 Doc/zsh.pdf /usr/share/doc/zsh-&zsh-version;</userinput></screen>
[6eff6e1]156
157 </sect2>
158
159 <sect2 role="commands">
160 <title>Command Explanations</title>
[29f80ebc]161
[f716ef4]162 <para>
163 <parameter>--sysconfdir=/etc/zsh</parameter> and
164 <parameter>--enable-etcdir=/etc/zsh</parameter>: These parameters are
165 used so that all the <application>zsh</application> configuration files
166 are consolidated into the <filename class='directory'>/etc/zsh</filename>
167 directory. Omit these parameters if you wish to retain historical
168 compatibility by having all the files located in the
169 <filename class='directory'>/etc</filename> directory.
170 </para>
[fd7e0ed6]171
[f716ef4]172 <para>
[4f4e7f18]173 <parameter>--enable-cap</parameter>: This option enables
[f716ef4]174 POSIX capabilities.
175 </para>
[fcf4b970]176
[f716ef4]177 <para>
[4f4e7f18]178 <parameter>--enable-gdbm</parameter>: This option enables the
[f716ef4]179 use of the <application>GDBM</application> library.
180 </para>
[caa0c15]181
[f716ef4]182 <para>
183 <option>--enable-pcre</option>: This option allows zsh to use
184 the <application>PCRE</application> regular expression library in shell
185 builtins.
186 </para>
[a6a160b]187 </sect2>
188
189 <sect2 role="configuration">
[f17b2db]190 <title>Configuring zsh</title>
[a6a160b]191
192 <sect3 id="zsh-config">
193 <title>Config Files</title>
194
[f716ef4]195 <para>
196 There are a whole host of configuration files for
197 <application>zsh</application> including
198 <filename>/etc/zsh/zshenv</filename>,
199 <filename>/etc/zsh/zprofile</filename>,
200 <filename>/etc/zsh/zshrc</filename>,
201 <filename>/etc/zsh/zlogin</filename> and
202 <filename>/etc/zsh/zlogout</filename>.
203 You can find more information on these in the
204 <filename>zsh(1)</filename> and related manual pages.
205 </para>
[a6a160b]206
[37b6e78]207 <para>
208 The first time zsh is executed, you will be prompted by messages asking
[8763a1da]209 several questions. The answers will be used to create a
[37b6e78]210 <filename>~/.zshrc</filename> file. If you wish to run these questions
211 again, run <command>zsh
212 /usr/share/zsh/&zsh-version;/functions/zsh-newuser-install -f</command>.
213 </para>
214
215 <para>
216 There are several built-in advanced prompts. In the
217 <command>zsh</command> shell, start advanced prompt support with
218 <command>autoload -U promptinit</command>, then
219 <command>promptinit</command>. Available prompt names are listed with
220 <command>prompt -l</command>. Select a particular one with
[f716ef4]221 <command>prompt <literal>&lt;prompt-name&gt;</literal></command>.
222 Display all available
[37b6e78]223 prompts with <command>prompt -p</command>. Except for the list and
224 display commands above, you can insert the other ones in
225 <filename>~/.zshrc</filename> to be automatically executed at
226 shell start, with the prompt you chose.
227 </para>
228
[a6a160b]229 <indexterm zone="zsh zsh-config">
[6eff6e1]230 <primary sortas="e-etc-zsh-zshenv">/etc/zsh/zshenv</primary>
[a6a160b]231 </indexterm>
232
233 <indexterm zone="zsh zsh-config">
[6eff6e1]234 <primary sortas="e-etc-zsh-zprofile">/etc/zsh/zprofile</primary>
[a6a160b]235 </indexterm>
236
237 <indexterm zone="zsh zsh-config">
[6eff6e1]238 <primary sortas="e-etc-zsh-zshrc">/etc/zsh/zshrc</primary>
[a6a160b]239 </indexterm>
240
241 <indexterm zone="zsh zsh-config">
[6eff6e1]242 <primary sortas="e-etc-zsh-zlogin">/etc/zsh/zlogin</primary>
[a6a160b]243 </indexterm>
244
245 <indexterm zone="zsh zsh-config">
[6eff6e1]246 <primary sortas="e-etc-zsh-zlogout">/etc/zsh/zlogout</primary>
[a6a160b]247 </indexterm>
248
249 </sect3>
250
[5ef8b741]251 <sect3>
252 <title>Configuration Information</title>
253
[f716ef4]254 <para>
255 Update <filename>/etc/shells</filename> to include the
256 <application>zsh</application> shell program names (as the
257 <systemitem class="username">root</systemitem> user):
258 </para>
[5ef8b741]259
260<screen role="root"><userinput>cat &gt;&gt; /etc/shells &lt;&lt; "EOF"
[e74610e7]261<literal>/bin/zsh</literal>
[5ef8b741]262EOF</userinput></screen>
263
264 </sect3>
265
[a6a160b]266 </sect2>
267
268 <sect2 role="content">
269 <title>Contents</title>
270
271 <segmentedlist>
[5ef8b741]272 <segtitle>Installed Programs</segtitle>
[a6a160b]273 <segtitle>Installed Libraries</segtitle>
274 <segtitle>Installed Directories</segtitle>
275
276 <seglistitem>
[e74610e7]277 <seg>zsh and zsh-&zsh-version; (hardlinked to each other)</seg>
[8763a1da]278 <seg>Numerous plugin helper modules under
[36e088d]279 /usr/lib/zsh/&zsh-version;/</seg>
[8763a1da]280 <seg>/usr/{lib,share}/zsh and /usr/share/doc/zsh-&zsh-version;</seg>
[a6a160b]281 </seglistitem>
282 </segmentedlist>
283
284 <variablelist>
285 <bridgehead renderas="sect3">Short Description</bridgehead>
286 <?dbfo list-presentation="list"?>
287 <?dbhtml list-presentation="table"?>
288
289 <varlistentry id="zsh-prog">
290 <term><command>zsh</command></term>
291 <listitem>
[f716ef4]292 <para>
293 is a shell which has command-line editing, built-in spelling
294 correction, programmable command completion, shell functions (with
[4c24eb0a]295 autoloading), a history mechanism, and a host of other features
[f716ef4]296 </para>
[a6a160b]297 <indexterm zone="zsh zsh-prog">
298 <primary sortas="b-zsh">zsh</primary>
299 </indexterm>
300 </listitem>
301 </varlistentry>
[1aa3a3ca]302
[a6a160b]303 </variablelist>
304
305 </sect2>
306
307</sect1>
Note: See TracBrowser for help on using the repository browser.