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

12.1 ken/TL2024 lazarus plabs/newcss rahul/power-profiles-daemon trunk xry111/llvm18
Last change on this file since 8525524b was 7299d5e, checked in by Xi Ruoyao <xry111@…>, 6 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
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY zsh-download-http "https://www.zsh.org/pub/zsh-&zsh-version;.tar.xz">
8 <!ENTITY zsh-download-ftp " ">
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)">
13
14 <!ENTITY zsh-doc-md5sum "8db53446f613521fb4f9b0bd9f6adda1">
15 <!ENTITY zsh-doc-size "3.0 MB">
16]>
17
18<sect1 id="zsh" xreflabel="zsh-&zsh-version;">
19 <?dbhtml filename="zsh.html"?>
20
21
22 <title>zsh-&zsh-version;</title>
23
24 <indexterm zone="zsh">
25 <primary sortas="a-zsh">zsh</primary>
26 </indexterm>
27
28 <sect2 role="package">
29 <title>Introduction to zsh</title>
30
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>
38
39 &lfs120_checked;
40
41 <bridgehead renderas="sect3">Package Information</bridgehead>
42 <itemizedlist spacing="compact">
43 <listitem>
44 <para>
45 Download (HTTP): <ulink url="&zsh-download-http;"/>
46 </para>
47 </listitem>
48 <listitem>
49 <para>
50 Download (FTP): <ulink url="&zsh-download-ftp;"/>
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download MD5 sum: &zsh-md5sum;
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Download size: &zsh-size;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Estimated disk space required: &zsh-buildsize;
66 </para>
67 </listitem>
68 <listitem>
69 <para>
70 Estimated build time: &zsh-time;
71 </para>
72 </listitem>
73 </itemizedlist>
74
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:
79 <ulink url="https://www.zsh.org/pub/old/"/>.
80 </para>
81 </note>
82
83 <bridgehead renderas="sect3">zsh Dependencies</bridgehead>
84
85 <bridgehead renderas="sect4">Optional</bridgehead>
86 <para role="optional">
87 <xref linkend="pcre"/> and
88 <xref linkend="valgrind"/>
89 </para>
90
91 </sect2>
92
93 <sect2 role="installation">
94 <title>Installation of zsh</title>
95
96 <para>
97 Adapt the documentation build system for texinfo-7.0 or later:
98 </para>
99
100<screen><userinput>sed -e 's/set_from_init_file/texinfo_&amp;/' \
101 -i Doc/Makefile.in</userinput></screen>
102
103<!-- <note>
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
107 the switch -\-with-tcsetpgrp to configure.
108 </para>
109 </note>
110-->
111 <para>
112 Install <application>zsh</application> by running the following
113 commands:
114 </para>
115
116<screen><userinput>./configure --prefix=/usr \
117 --sysconfdir=/etc/zsh \
118 --enable-etcdir=/etc/zsh \
119 --enable-cap \
120 --enable-gdbm &amp;&amp;
121make &amp;&amp;
122
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>
126
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>
132
133<screen remap="doc"><userinput>texi2pdf Doc/zsh.texi -o Doc/zsh.pdf</userinput></screen>
134
135 <para>
136 To test the results, issue: <command>make check</command>.
137 </para>
138
139 <para>
140 Now, as the <systemitem class="username">root</systemitem> user:
141 </para>
142
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>
147
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>
153
154<screen role="root"
155 remap="doc"><userinput>install -v -m644 Doc/zsh.pdf /usr/share/doc/zsh-&zsh-version;</userinput></screen>
156
157 </sect2>
158
159 <sect2 role="commands">
160 <title>Command Explanations</title>
161
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>
171
172 <para>
173 <parameter>--enable-cap</parameter>: This option enables
174 POSIX capabilities.
175 </para>
176
177 <para>
178 <parameter>--enable-gdbm</parameter>: This option enables the
179 use of the <application>GDBM</application> library.
180 </para>
181
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>
187 </sect2>
188
189 <sect2 role="configuration">
190 <title>Configuring zsh</title>
191
192 <sect3 id="zsh-config">
193 <title>Config Files</title>
194
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>
206
207 <para>
208 The first time zsh is executed, you will be prompted by messages asking
209 several questions. The answers will be used to create a
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
221 <command>prompt <literal>&lt;prompt-name&gt;</literal></command>.
222 Display all available
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
229 <indexterm zone="zsh zsh-config">
230 <primary sortas="e-etc-zsh-zshenv">/etc/zsh/zshenv</primary>
231 </indexterm>
232
233 <indexterm zone="zsh zsh-config">
234 <primary sortas="e-etc-zsh-zprofile">/etc/zsh/zprofile</primary>
235 </indexterm>
236
237 <indexterm zone="zsh zsh-config">
238 <primary sortas="e-etc-zsh-zshrc">/etc/zsh/zshrc</primary>
239 </indexterm>
240
241 <indexterm zone="zsh zsh-config">
242 <primary sortas="e-etc-zsh-zlogin">/etc/zsh/zlogin</primary>
243 </indexterm>
244
245 <indexterm zone="zsh zsh-config">
246 <primary sortas="e-etc-zsh-zlogout">/etc/zsh/zlogout</primary>
247 </indexterm>
248
249 </sect3>
250
251 <sect3>
252 <title>Configuration Information</title>
253
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>
259
260<screen role="root"><userinput>cat &gt;&gt; /etc/shells &lt;&lt; "EOF"
261<literal>/bin/zsh</literal>
262EOF</userinput></screen>
263
264 </sect3>
265
266 </sect2>
267
268 <sect2 role="content">
269 <title>Contents</title>
270
271 <segmentedlist>
272 <segtitle>Installed Programs</segtitle>
273 <segtitle>Installed Libraries</segtitle>
274 <segtitle>Installed Directories</segtitle>
275
276 <seglistitem>
277 <seg>zsh and zsh-&zsh-version; (hardlinked to each other)</seg>
278 <seg>Numerous plugin helper modules under
279 /usr/lib/zsh/&zsh-version;/</seg>
280 <seg>/usr/{lib,share}/zsh and /usr/share/doc/zsh-&zsh-version;</seg>
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>
292 <para>
293 is a shell which has command-line editing, built-in spelling
294 correction, programmable command completion, shell functions (with
295 autoloading), a history mechanism, and a host of other features
296 </para>
297 <indexterm zone="zsh zsh-prog">
298 <primary sortas="b-zsh">zsh</primary>
299 </indexterm>
300 </listitem>
301 </varlistentry>
302
303 </variablelist>
304
305 </sect2>
306
307</sect1>
Note: See TracBrowser for help on using the repository browser.