source: postlfs/shells/zsh.xml@ 90f9400

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 90f9400 was 90f9400, checked in by Fernando de Oliveira <fernando@…>, 10 years ago

Tag SeaMonkey-2.24. Add entry in 'Command Explanations' for new sed in zsh-5.0.5.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@12775 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 12.3 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 "http://www.zsh.org/pub/zsh-&zsh-version;.tar.bz2">
8 <!ENTITY zsh-download-ftp " ">
9 <!ENTITY zsh-md5sum "6156dc2f19b0a067bdbc0fb7f81e2017">
10 <!ENTITY zsh-size "3.0 MB">
11 <!ENTITY zsh-buildsize "61 MB (includes installing documentation -
12 additional 2 MB for PDF documentation)">
13 <!ENTITY zsh-time "0.8 SBU (additional 2 SBU for tests)">
14
15 <!ENTITY zsh-doc-md5sum "1eea70e7401a7a2116fa8de6ee5e8d32">
16 <!ENTITY zsh-doc-size "2.9 MB">
17]>
18
19<sect1 id="zsh" xreflabel="zsh-&zsh-version;">
20 <?dbhtml filename="zsh.html"?>
21
22 <sect1info>
23 <othername>$LastChangedBy$</othername>
24 <date>$Date$</date>
25 </sect1info>
26
27 <title>zsh-&zsh-version;</title>
28
29 <indexterm zone="zsh">
30 <primary sortas="a-zsh">zsh</primary>
31 </indexterm>
32
33 <sect2 role="package">
34 <title>Introduction to zsh</title>
35
36 <para>The <application>zsh</application> package contains a command
37 interpreter (shell) usable as an interactive login shell and as
38 a shell script command processor. Of the standard shells,
39 <application>zsh</application> most closely resembles
40 <application>ksh</application> but includes many enhancements.</para>
41
42 &lfs75_checked;
43
44 <bridgehead renderas="sect3">Package Information</bridgehead>
45 <itemizedlist spacing="compact">
46 <listitem>
47 <para>Download (HTTP): <ulink url="&zsh-download-http;"/></para>
48 </listitem>
49 <listitem>
50 <para>Download (FTP): <ulink url="&zsh-download-ftp;"/></para>
51 </listitem>
52 <listitem>
53 <para>Download MD5 sum: &zsh-md5sum;</para>
54 </listitem>
55 <listitem>
56 <para>Download size: &zsh-size;</para>
57 </listitem>
58 <listitem>
59 <para>Estimated disk space required: &zsh-buildsize;</para>
60 </listitem>
61 <listitem>
62 <para>Estimated build time: &zsh-time;</para>
63 </listitem>
64 </itemizedlist>
65
66 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
67 <itemizedlist spacing="compact">
68 <listitem>
69 <para>Optional Documentation: <ulink
70 url="http://www.zsh.org/pub/zsh-&zsh-version;-doc.tar.bz2"/></para>
71 </listitem>
72 <listitem>
73 <para>Documentation MD5 sum: &zsh-doc-md5sum;</para>
74 </listitem>
75 <listitem>
76 <para>Documentation download size: &zsh-doc-size;</para>
77 </listitem>
78 </itemizedlist>
79
80 <bridgehead renderas="sect3">zsh Dependencies</bridgehead>
81
82 <bridgehead renderas="sect4">Optional</bridgehead>
83 <para role="optional">
84 <ulink url="ftp://ftp.gnu.org/gnu/gdbm/">gdbm</ulink>,
85 <xref linkend="pcre"/> and
86 <xref linkend="libcap"/>
87 </para>
88
89 <para condition="html" role="usernotes">User Notes:
90 <ulink url="&blfs-wiki;/zsh"/></para>
91
92 </sect2>
93
94 <sect2 role="installation">
95 <title>Installation of zsh</title>
96
97 <para>If you downloaded the optional documentation, unpack it with
98 the following command:</para>
99
100<screen><userinput>tar --strip-components=1 -xvf ../zsh-&zsh-version;-doc.tar.bz2</userinput></screen>
101
102 <note>
103 <para>
104 Using a script to build with "su -c script" may produce a funny
105 configure error message: "no controlling tty". If this happens, add
106 the switch --with-tcsetpgrp to configure.
107 </para>
108 </note>
109
110 <para>Install <application>zsh</application> by running the following
111 commands:</para>
112
113<screen><userinput>sed -e '/attr.mdh/ d' -e '/attr.pro/ d' \
114 -e '/include &lt;sys\/xattr.h&gt;/ a\\n#include "attr.mdh"\n#include "attr.pro"' \
115 -i Src/Modules/attr.c &amp;&amp;
116
117./configure --prefix=/usr \
118 --bindir=/bin \
119 --sysconfdir=/etc/zsh \
120 --enable-etcdir=/etc/zsh &amp;&amp;
121make &amp;&amp;
122
123makeinfo Doc/zsh.texi --html -o Doc/html &amp;&amp;
124makeinfo Doc/zsh.texi --html --no-split --no-headers \
125 -o Doc/zsh.html &amp;&amp;
126makeinfo Doc/zsh.texi --plaintext -o Doc/zsh.txt</userinput></screen>
127
128 <para>If you have <xref linkend="texlive"/>
129 installed, you can build PDF format of the documentation by issuing
130 the following command:</para>
131
132<screen><userinput>texi2pdf Doc/zsh.texi -o Doc/zsh.pdf</userinput></screen>
133
134 <para>To test the results, issue: <command>make check</command>.</para>
135
136 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
137
138<screen role="root"><userinput>make install &amp;&amp;
139make infodir=/usr/share/info install.info
140
141install -v -m755 -d /usr/share/doc/zsh-&zsh-version;/html &amp;&amp;
142install -v -m644 Doc/html/* \
143 /usr/share/doc/zsh-&zsh-version;/html &amp;&amp;
144install -v -m644 Doc/zsh.{html,txt} \
145 /usr/share/doc/zsh-&zsh-version;</userinput></screen>
146
147 <para>If you downloaded the optional documentation, install it by issuing
148 the following commands as the
149 <systemitem class="username">root</systemitem> user:</para>
150
151<screen role="root"><userinput>make htmldir=/usr/share/doc/zsh-&zsh-version;/html install.html &amp;&amp;
152install -v -m644 Doc/zsh.dvi /usr/share/doc/zsh-&zsh-version;</userinput></screen>
153
154 <para>If you built the PDF format of the documentation, install
155 it by issuing the following command as the
156 <systemitem class="username">root</systemitem> user:</para>
157
158<screen role="root"><userinput>install -v -m644 Doc/zsh.pdf \
159 /usr/share/doc/zsh-&zsh-version;</userinput></screen>
160
161 </sect2>
162
163 <sect2 role="commands">
164 <title>Command Explanations</title>
165
166 <para><command>sed ... Src/Modules/attr.c</command>: Fix
167 <application>ksh-&zsh-version;</application> to build with
168 <application>libcap-2.2x</application> (x &gt; 23).</para>
169
170 <para><parameter>--sysconfdir=/etc/zsh</parameter> and
171 <parameter>--enable-etcdir=/etc/zsh</parameter>: These parameters are
172 used so that all the <application>zsh</application> configuration files
173 are consolidated into the <filename class='directory'>/etc/zsh</filename>
174 directory. Omit these parameters if you wish to retain historical
175 compatibility by having all the files located in the
176 <filename class='directory'>/etc</filename> directory.</para>
177
178 <para><parameter>--bindir=/bin</parameter>: This parameter places the
179 <command>zsh</command> binaries into the root filesystem.</para>
180
181 <para><option>--enable-cap</option>: This option enables
182 POSIX capabilities.</para>
183
184 <para><option>--disable-gdbm</option>: This option disables the
185 use of the <application>GDBM</application> library.</para>
186
187 <para><option>--enable-pcre</option>: This option allows to use
188 the <application>pcre</application> regular expression library in shell
189 builtins.</para>
190
191 <sect3 id="mountpoints">
192 <title>Multiple partitions</title>
193
194 <para>Linking <application>zsh</application> dynamically against
195 <application>pcre</application> and/or <application>gdbm</application>
196 produces runtime dependencies on <filename class='libraryfile'>
197 libpcre.so</filename> and/or <filename class='libraryfile'>libgdbm.so
198 </filename>respectively, which both reside in
199 <filename class='directory'>/usr</filename> hierarchy. If
200 <filename class='directory'>/usr</filename> is a separate mount point
201 and <application>zsh</application> needs to be available in boot time,
202 then its supporting libraries should be in
203 <filename class='directory'>/lib</filename> too. You can move the
204 libraries as follows:</para>
205
206<screen role="root"><userinput>mv -v /usr/lib/libpcre.so.* /lib &amp;&amp;
207ln -v -sf ../../lib/libpcre.so.0 /usr/lib/libpcre.so
208
209mv -v /usr/lib/libgdbm.so.* /lib &amp;&amp;
210ln -v -sf ../../lib/libgdbm.so.3 /usr/lib/libgdbm.so</userinput>
211</screen>
212
213 <para>Alternatively you can statically link <application>zsh</application>
214 against <application>pcre</application> and <application>gdbm</application>
215 if you modify the <filename>config.modules</filename> file (you need first
216 to run configure to generate it).</para>
217
218 </sect3>
219
220 </sect2>
221
222 <sect2 role="configuration">
223 <title>Configuring zsh</title>
224
225 <sect3 id="zsh-config">
226 <title>Config Files</title>
227
228 <para>There are a whole host of configuration files for
229 <application>zsh</application> including
230 <filename>/etc/zsh/zshenv</filename>,
231 <filename>/etc/zsh/zprofile</filename>,
232 <filename>/etc/zsh/zshrc</filename>,
233 <filename>/etc/zsh/zlogin</filename> and
234 <filename>/etc/zsh/zlogout</filename>.
235 You can find more information on these in the <filename>zsh(1)</filename>
236 and related manual pages.</para>
237
238 <para>
239 The first time zsh is executed, you will be prompted by messages asking
240 several questions. The answers will be used to create a
241 <filename>~/.zshrc</filename> file. If you wish to run these questions
242 again, run <command>zsh
243 /usr/share/zsh/&zsh-version;/functions/zsh-newuser-install -f</command>.
244 </para>
245
246 <para>
247 There are several built-in advanced prompts. In the
248 <command>zsh</command> shell, start advanced prompt support with
249 <command>autoload -U promptinit</command>, then
250 <command>promptinit</command>. Available prompt names are listed with
251 <command>prompt -l</command>. Select a particular one with
252 <command>prompt <literal>&lt;prompt-name&gt;</literal></command>. Display all available
253 prompts with <command>prompt -p</command>. Except for the list and
254 display commands above, you can insert the other ones in
255 <filename>~/.zshrc</filename> to be automatically executed at
256 shell start, with the prompt you chose.
257 </para>
258
259 <indexterm zone="zsh zsh-config">
260 <primary sortas="e-etc-zsh-zshenv">/etc/zsh/zshenv</primary>
261 </indexterm>
262
263 <indexterm zone="zsh zsh-config">
264 <primary sortas="e-etc-zsh-zprofile">/etc/zsh/zprofile</primary>
265 </indexterm>
266
267 <indexterm zone="zsh zsh-config">
268 <primary sortas="e-etc-zsh-zshrc">/etc/zsh/zshrc</primary>
269 </indexterm>
270
271 <indexterm zone="zsh zsh-config">
272 <primary sortas="e-etc-zsh-zlogin">/etc/zsh/zlogin</primary>
273 </indexterm>
274
275 <indexterm zone="zsh zsh-config">
276 <primary sortas="e-etc-zsh-zlogout">/etc/zsh/zlogout</primary>
277 </indexterm>
278
279 </sect3>
280
281 <sect3>
282 <title>Configuration Information</title>
283
284 <para>Update <filename>/etc/shells</filename> to include the
285 <application>zsh</application> shell program names (as the
286 <systemitem class="username">root</systemitem> user):</para>
287
288<screen role="root"><userinput>cat &gt;&gt; /etc/shells &lt;&lt; "EOF"
289<literal>/bin/zsh
290/bin/zsh-&zsh-version;</literal>
291EOF</userinput></screen>
292
293 </sect3>
294
295 </sect2>
296
297 <sect2 role="content">
298 <title>Contents</title>
299
300 <segmentedlist>
301 <segtitle>Installed Programs</segtitle>
302 <segtitle>Installed Libraries</segtitle>
303 <segtitle>Installed Directories</segtitle>
304
305 <seglistitem>
306 <seg>zsh (hardlink to zsh-&zsh-version;) and zsh-&zsh-version;</seg>
307 <seg>Numerous plugin helper modules under
308 /usr/lib/zsh/&zsh-version;/</seg>
309 <seg>/etc/zsh, /usr/lib/zsh, /usr/share/doc/zsh-&zsh-version; and
310 /usr/share/zsh</seg>
311 </seglistitem>
312 </segmentedlist>
313
314 <variablelist>
315 <bridgehead renderas="sect3">Short Description</bridgehead>
316 <?dbfo list-presentation="list"?>
317 <?dbhtml list-presentation="table"?>
318
319 <varlistentry id="zsh-prog">
320 <term><command>zsh</command></term>
321 <listitem>
322 <para>is a shell which has command-line editing, built-in spelling
323 correction, programmable command completion, shell functions (with
324 autoloading), a history mechanism, and a host of other features.</para>
325 <indexterm zone="zsh zsh-prog">
326 <primary sortas="b-zsh">zsh</primary>
327 </indexterm>
328 </listitem>
329 </varlistentry>
330
331 </variablelist>
332
333 </sect2>
334
335</sect1>
Note: See TracBrowser for help on using the repository browser.