source: postlfs/shells/zsh.xml@ 648752cf

ken/TL2024 trunk xry111/llvm18
Last change on this file since 648752cf was 868811b, checked in by Bruce Dubbs <bdubbs@…>, 2 months ago

Many tags.
genutils
sysutils
netlibs
netprogs
netutils
editors
filesystems
shells

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