source: postlfs/shells/zsh.xml@ 64135787

kde5-14269
Last change on this file since 64135787 was 64135787, checked in by Xi Ruoyao <xry111@…>, 3 years ago

Begin manually (while modifying stuff) merging trunk and systemd branches since revision 14087.

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