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