source: postlfs/shells/zsh.xml

trunk
Last change on this file was abfacaf, checked in by Xi Ruoyao <xry111@…>, 6 weeks ago

Remove most references to PCRE1

Some notes:

  • proftpd has been supporting PCRE2 since 1.3.8a.
  • bluefish actually invokes PCRE via Glib, so since Glib was ported from PCRE1 to PCRE2 bluefish has been using PCRE2 in fact.
  • zsh and rasqal will support PCRE2 in the next release. For zsh pcre is not used with book instruction anyway, and for rasqal the maintainer suggests just relying on Glibc regex.h before the next release.
  • The other distros (Fedora for eg) are already disabling PCRE for slang.
  • Property mode set to 100644
File size: 10.4 KB
RevLine 
[ab4fdfc]1<?xml version="1.0" encoding="UTF-8"?>
[6732c094]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[44f085a]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
[c6b192c]7 <!ENTITY zsh-download-http "https://www.zsh.org/pub/zsh-&zsh-version;.tar.xz">
[8070ffce]8 <!ENTITY zsh-download-ftp " ">
[06333e6]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)">
[44f085a]13]>
14
[f17b2db]15<sect1 id="zsh" xreflabel="zsh-&zsh-version;">
[a6a160b]16 <?dbhtml filename="zsh.html"?>
[f45b1953]17
[a6a160b]18
[f17b2db]19 <title>zsh-&zsh-version;</title>
[a6a160b]20
21 <indexterm zone="zsh">
[f17b2db]22 <primary sortas="a-zsh">zsh</primary>
[a6a160b]23 </indexterm>
24
25 <sect2 role="package">
[f17b2db]26 <title>Introduction to zsh</title>
[a6a160b]27
[f716ef4]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>
[a6a160b]35
[868811b]36 &lfs121_checked;
[6eff6e1]37
[a6a160b]38 <bridgehead renderas="sect3">Package Information</bridgehead>
39 <itemizedlist spacing="compact">
40 <listitem>
[f716ef4]41 <para>
42 Download (HTTP): <ulink url="&zsh-download-http;"/>
43 </para>
[a6a160b]44 </listitem>
45 <listitem>
[f716ef4]46 <para>
47 Download (FTP): <ulink url="&zsh-download-ftp;"/>
48 </para>
[a6a160b]49 </listitem>
50 <listitem>
[f716ef4]51 <para>
52 Download MD5 sum: &zsh-md5sum;
53 </para>
[a6a160b]54 </listitem>
55 <listitem>
[f716ef4]56 <para>
57 Download size: &zsh-size;
58 </para>
[a6a160b]59 </listitem>
60 <listitem>
[f716ef4]61 <para>
62 Estimated disk space required: &zsh-buildsize;
63 </para>
[a6a160b]64 </listitem>
65 <listitem>
[f716ef4]66 <para>
67 Estimated build time: &zsh-time;
68 </para>
[a6a160b]69 </listitem>
70 </itemizedlist>
71
[1590eb9]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:
[c6b192c]76 <ulink url="https://www.zsh.org/pub/old/"/>.
[1590eb9]77 </para>
78 </note>
79
[f17b2db]80 <bridgehead renderas="sect3">zsh Dependencies</bridgehead>
[a6a160b]81
82 <bridgehead renderas="sect4">Optional</bridgehead>
[ca17955]83 <para role="optional">
[abfacaf]84 <!-- <xref linkend="pcre2"/>, The next zsh release will support it -->
85 <xref linkend="valgrind"/> and
[d472e22c]86 <ulink url='https://fbb-git.gitlab.io/yodl/'>yodl</ulink>
[fcf4b970]87 </para>
[a6a160b]88
89 </sect2>
90
91 <sect2 role="installation">
[f17b2db]92 <title>Installation of zsh</title>
[a6a160b]93
[f716ef4]94 <para>
[7299d5e]95 Adapt the documentation build system for texinfo-7.0 or later:
[f716ef4]96 </para>
[98078a6]97
[7299d5e]98<screen><userinput>sed -e 's/set_from_init_file/texinfo_&amp;/' \
99 -i Doc/Makefile.in</userinput></screen>
[6eff6e1]100
[d472e22c]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
[8f1fc267]113<!-- <note>
[37b6e78]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
[8f1fc267]117 the switch -\-with-tcsetpgrp to configure.
[37b6e78]118 </para>
119 </note>
[8f1fc267]120-->
[f716ef4]121 <para>
122 Install <application>zsh</application> by running the following
123 commands:
124 </para>
[a6a160b]125
[4f4e7f18]126<screen><userinput>./configure --prefix=/usr \
127 --sysconfdir=/etc/zsh \
128 --enable-etcdir=/etc/zsh \
129 --enable-cap \
[7299d5e]130 --enable-gdbm &amp;&amp;
131make &amp;&amp;
[a6a160b]132
[7299d5e]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>
[6eff6e1]136
[f716ef4]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>
[f1e103a]142
[06908bf6]143<screen remap="doc"><userinput>texi2pdf Doc/zsh.texi -o Doc/zsh.pdf</userinput></screen>
[f1e103a]144
[f716ef4]145 <para>
146 To test the results, issue: <command>make check</command>.
147 </para>
[5ef8b741]148
[f716ef4]149 <para>
150 Now, as the <systemitem class="username">root</systemitem> user:
151 </para>
[a6a160b]152
[7299d5e]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>
[6eff6e1]157
[f716ef4]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>
[6eff6e1]163
[06908bf6]164<screen role="root"
165 remap="doc"><userinput>install -v -m644 Doc/zsh.pdf /usr/share/doc/zsh-&zsh-version;</userinput></screen>
[6eff6e1]166
167 </sect2>
168
169 <sect2 role="commands">
170 <title>Command Explanations</title>
[29f80ebc]171
[f716ef4]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>
[fd7e0ed6]181
[f716ef4]182 <para>
[4f4e7f18]183 <parameter>--enable-cap</parameter>: This option enables
[f716ef4]184 POSIX capabilities.
185 </para>
[fcf4b970]186
[f716ef4]187 <para>
[4f4e7f18]188 <parameter>--enable-gdbm</parameter>: This option enables the
[f716ef4]189 use of the <application>GDBM</application> library.
190 </para>
[abfacaf]191<!-- the next zsh release will support it
[f716ef4]192 <para>
[abfacaf]193 <option>- -enable-pcre</option>: This option allows zsh to use
194 the <application>PCRE2</application> regular expression library in shell
[f716ef4]195 builtins.
196 </para>
[abfacaf]197-->
[a6a160b]198 </sect2>
199
200 <sect2 role="configuration">
[f17b2db]201 <title>Configuring zsh</title>
[a6a160b]202
203 <sect3 id="zsh-config">
204 <title>Config Files</title>
205
[f716ef4]206 <para>
207 There are a whole host of configuration files for
208 <application>zsh</application> including
209 <filename>/etc/zsh/zshenv</filename>,
210 <filename>/etc/zsh/zprofile</filename>,
211 <filename>/etc/zsh/zshrc</filename>,
212 <filename>/etc/zsh/zlogin</filename> and
213 <filename>/etc/zsh/zlogout</filename>.
214 You can find more information on these in the
[fedbe2f]215 <ulink role='man' url='&man;zsh.1'>zsh(1)</ulink> and related
216 manual pages.
[f716ef4]217 </para>
[a6a160b]218
[37b6e78]219 <para>
220 The first time zsh is executed, you will be prompted by messages asking
[8763a1da]221 several questions. The answers will be used to create a
[37b6e78]222 <filename>~/.zshrc</filename> file. If you wish to run these questions
223 again, run <command>zsh
224 /usr/share/zsh/&zsh-version;/functions/zsh-newuser-install -f</command>.
225 </para>
226
227 <para>
228 There are several built-in advanced prompts. In the
229 <command>zsh</command> shell, start advanced prompt support with
230 <command>autoload -U promptinit</command>, then
231 <command>promptinit</command>. Available prompt names are listed with
232 <command>prompt -l</command>. Select a particular one with
[f716ef4]233 <command>prompt <literal>&lt;prompt-name&gt;</literal></command>.
234 Display all available
[37b6e78]235 prompts with <command>prompt -p</command>. Except for the list and
236 display commands above, you can insert the other ones in
237 <filename>~/.zshrc</filename> to be automatically executed at
238 shell start, with the prompt you chose.
239 </para>
240
[a6a160b]241 <indexterm zone="zsh zsh-config">
[6eff6e1]242 <primary sortas="e-etc-zsh-zshenv">/etc/zsh/zshenv</primary>
[a6a160b]243 </indexterm>
244
245 <indexterm zone="zsh zsh-config">
[6eff6e1]246 <primary sortas="e-etc-zsh-zprofile">/etc/zsh/zprofile</primary>
[a6a160b]247 </indexterm>
248
249 <indexterm zone="zsh zsh-config">
[6eff6e1]250 <primary sortas="e-etc-zsh-zshrc">/etc/zsh/zshrc</primary>
[a6a160b]251 </indexterm>
252
253 <indexterm zone="zsh zsh-config">
[6eff6e1]254 <primary sortas="e-etc-zsh-zlogin">/etc/zsh/zlogin</primary>
[a6a160b]255 </indexterm>
256
257 <indexterm zone="zsh zsh-config">
[6eff6e1]258 <primary sortas="e-etc-zsh-zlogout">/etc/zsh/zlogout</primary>
[a6a160b]259 </indexterm>
260
261 </sect3>
262
[5ef8b741]263 <sect3>
264 <title>Configuration Information</title>
265
[f716ef4]266 <para>
267 Update <filename>/etc/shells</filename> to include the
268 <application>zsh</application> shell program names (as the
269 <systemitem class="username">root</systemitem> user):
270 </para>
[5ef8b741]271
272<screen role="root"><userinput>cat &gt;&gt; /etc/shells &lt;&lt; "EOF"
[e74610e7]273<literal>/bin/zsh</literal>
[5ef8b741]274EOF</userinput></screen>
275
276 </sect3>
277
[a6a160b]278 </sect2>
279
280 <sect2 role="content">
281 <title>Contents</title>
282
283 <segmentedlist>
[5ef8b741]284 <segtitle>Installed Programs</segtitle>
[a6a160b]285 <segtitle>Installed Libraries</segtitle>
286 <segtitle>Installed Directories</segtitle>
287
288 <seglistitem>
[e74610e7]289 <seg>zsh and zsh-&zsh-version; (hardlinked to each other)</seg>
[8763a1da]290 <seg>Numerous plugin helper modules under
[36e088d]291 /usr/lib/zsh/&zsh-version;/</seg>
[8763a1da]292 <seg>/usr/{lib,share}/zsh and /usr/share/doc/zsh-&zsh-version;</seg>
[a6a160b]293 </seglistitem>
294 </segmentedlist>
295
296 <variablelist>
297 <bridgehead renderas="sect3">Short Description</bridgehead>
298 <?dbfo list-presentation="list"?>
299 <?dbhtml list-presentation="table"?>
300
301 <varlistentry id="zsh-prog">
302 <term><command>zsh</command></term>
303 <listitem>
[f716ef4]304 <para>
305 is a shell which has command-line editing, built-in spelling
306 correction, programmable command completion, shell functions (with
[4c24eb0a]307 autoloading), a history mechanism, and a host of other features
[f716ef4]308 </para>
[a6a160b]309 <indexterm zone="zsh zsh-prog">
310 <primary sortas="b-zsh">zsh</primary>
311 </indexterm>
312 </listitem>
313 </varlistentry>
[1aa3a3c]314
[a6a160b]315 </variablelist>
316
317 </sect2>
318
319</sect1>
Note: See TracBrowser for help on using the repository browser.