[44f085a] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[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 |
|
---|
[4938dadc] | 7 | <!ENTITY zsh-download-http "http://www.zsh.org/pub/zsh-&zsh-version;.tar.bz2">
|
---|
[8070ffce] | 8 | <!ENTITY zsh-download-ftp " ">
|
---|
[37b6e78] | 9 | <!ENTITY zsh-md5sum "6156dc2f19b0a067bdbc0fb7f81e2017">
|
---|
[4938dadc] | 10 | <!ENTITY zsh-size "3.0 MB">
|
---|
[36e088d] | 11 | <!ENTITY zsh-buildsize "61 MB (includes installing documentation -
|
---|
| 12 | additional 2 MB for PDF documentation)">
|
---|
[37b6e78] | 13 | <!ENTITY zsh-time "0.8 SBU (additional 2 SBU for tests)">
|
---|
[6eff6e1] | 14 |
|
---|
[37b6e78] | 15 | <!ENTITY zsh-doc-md5sum "1eea70e7401a7a2116fa8de6ee5e8d32">
|
---|
| 16 | <!ENTITY zsh-doc-size "2.9 MB">
|
---|
[44f085a] | 17 | ]>
|
---|
| 18 |
|
---|
[f17b2db] | 19 | <sect1 id="zsh" xreflabel="zsh-&zsh-version;">
|
---|
[a6a160b] | 20 | <?dbhtml filename="zsh.html"?>
|
---|
[f45b1953] | 21 |
|
---|
[a6a160b] | 22 | <sect1info>
|
---|
| 23 | <othername>$LastChangedBy$</othername>
|
---|
| 24 | <date>$Date$</date>
|
---|
| 25 | </sect1info>
|
---|
| 26 |
|
---|
[f17b2db] | 27 | <title>zsh-&zsh-version;</title>
|
---|
[a6a160b] | 28 |
|
---|
| 29 | <indexterm zone="zsh">
|
---|
[f17b2db] | 30 | <primary sortas="a-zsh">zsh</primary>
|
---|
[a6a160b] | 31 | </indexterm>
|
---|
| 32 |
|
---|
| 33 | <sect2 role="package">
|
---|
[f17b2db] | 34 | <title>Introduction to zsh</title>
|
---|
[a6a160b] | 35 |
|
---|
[f17b2db] | 36 | <para>The <application>zsh</application> package contains a command
|
---|
[a6a160b] | 37 | interpreter (shell) usable as an interactive login shell and as
|
---|
| 38 | a shell script command processor. Of the standard shells,
|
---|
[f17b2db] | 39 | <application>zsh</application> most closely resembles
|
---|
| 40 | <application>ksh</application> but includes many enhancements.</para>
|
---|
[a6a160b] | 41 |
|
---|
[cdabd810] | 42 | &lfs75_checked;
|
---|
[6eff6e1] | 43 |
|
---|
[a6a160b] | 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 |
|
---|
[6eff6e1] | 66 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
[29f80ebc] | 67 | <itemizedlist spacing="compact">
|
---|
| 68 | <listitem>
|
---|
[6eff6e1] | 69 | <para>Optional Documentation: <ulink
|
---|
[4938dadc] | 70 | url="http://www.zsh.org/pub/zsh-&zsh-version;-doc.tar.bz2"/></para>
|
---|
[6eff6e1] | 71 | </listitem>
|
---|
[29f80ebc] | 72 | <listitem>
|
---|
[ca17955] | 73 | <para>Documentation MD5 sum: &zsh-doc-md5sum;</para>
|
---|
[6eff6e1] | 74 | </listitem>
|
---|
[37b6e78] | 75 | <listitem>
|
---|
| 76 | <para>Documentation download size: &zsh-doc-size;</para>
|
---|
| 77 | </listitem>
|
---|
[6eff6e1] | 78 | </itemizedlist>
|
---|
| 79 |
|
---|
[f17b2db] | 80 | <bridgehead renderas="sect3">zsh Dependencies</bridgehead>
|
---|
[a6a160b] | 81 |
|
---|
| 82 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[ca17955] | 83 | <para role="optional">
|
---|
[e7323262] | 84 | <xref linkend="pcre"/>
|
---|
[fcf4b970] | 85 | </para>
|
---|
[a6a160b] | 86 |
|
---|
[3597eb6] | 87 | <para condition="html" role="usernotes">User Notes:
|
---|
| 88 | <ulink url="&blfs-wiki;/zsh"/></para>
|
---|
| 89 |
|
---|
[a6a160b] | 90 | </sect2>
|
---|
| 91 |
|
---|
| 92 | <sect2 role="installation">
|
---|
[f17b2db] | 93 | <title>Installation of zsh</title>
|
---|
[a6a160b] | 94 |
|
---|
[98078a63] | 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>
|
---|
[6eff6e1] | 99 |
|
---|
[37b6e78] | 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 |
|
---|
[f17b2db] | 108 | <para>Install <application>zsh</application> by running the following
|
---|
[a6a160b] | 109 | commands:</para>
|
---|
| 110 |
|
---|
[cdabd810] | 111 | <screen><userinput>sed -e '/attr.mdh/ d' -e '/attr.pro/ d' \
|
---|
| 112 | -e '/include <sys\/xattr.h>/ a\\n#include "attr.mdh"\n#include "attr.pro"' \
|
---|
| 113 | -i Src/Modules/attr.c &&
|
---|
| 114 |
|
---|
| 115 | ./configure --prefix=/usr \
|
---|
[ca17955] | 116 | --bindir=/bin \
|
---|
[6eff6e1] | 117 | --sysconfdir=/etc/zsh \
|
---|
[ca17955] | 118 | --enable-etcdir=/etc/zsh &&
|
---|
| 119 | make &&
|
---|
[a6a160b] | 120 |
|
---|
[ca17955] | 121 | makeinfo Doc/zsh.texi --html -o Doc/html &&
|
---|
| 122 | makeinfo Doc/zsh.texi --html --no-split --no-headers \
|
---|
| 123 | -o Doc/zsh.html &&
|
---|
[6eff6e1] | 124 | makeinfo Doc/zsh.texi --plaintext -o Doc/zsh.txt</userinput></screen>
|
---|
| 125 |
|
---|
[8aeb474] | 126 | <para>If you have <xref linkend="texlive"/>
|
---|
[f1e103a] | 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 |
|
---|
[5ef8b741] | 132 | <para>To test the results, issue: <command>make check</command>.</para>
|
---|
| 133 |
|
---|
[a6a160b] | 134 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 135 |
|
---|
[5ef8b741] | 136 | <screen role="root"><userinput>make install &&
|
---|
[f1e103a] | 137 | make infodir=/usr/share/info install.info
|
---|
| 138 |
|
---|
| 139 | install -v -m755 -d /usr/share/doc/zsh-&zsh-version;/html &&
|
---|
| 140 | install -v -m644 Doc/html/* \
|
---|
| 141 | /usr/share/doc/zsh-&zsh-version;/html &&
|
---|
| 142 | install -v -m644 Doc/zsh.{html,txt} \
|
---|
| 143 | /usr/share/doc/zsh-&zsh-version;</userinput></screen>
|
---|
[6eff6e1] | 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 &&
|
---|
[fcf4b970] | 150 | install -v -m644 Doc/zsh.dvi /usr/share/doc/zsh-&zsh-version;</userinput></screen>
|
---|
[6eff6e1] | 151 |
|
---|
[f1e103a] | 152 | <para>If you built the PDF format of the documentation, install
|
---|
| 153 | it by issuing the following command as the
|
---|
[6eff6e1] | 154 | <systemitem class="username">root</systemitem> user:</para>
|
---|
| 155 |
|
---|
[f1e103a] | 156 | <screen role="root"><userinput>install -v -m644 Doc/zsh.pdf \
|
---|
[6eff6e1] | 157 | /usr/share/doc/zsh-&zsh-version;</userinput></screen>
|
---|
| 158 |
|
---|
| 159 | </sect2>
|
---|
| 160 |
|
---|
| 161 | <sect2 role="commands">
|
---|
| 162 | <title>Command Explanations</title>
|
---|
[29f80ebc] | 163 |
|
---|
[90f9400] | 164 | <para><command>sed ... Src/Modules/attr.c</command>: Fix
|
---|
[795c0a0] | 165 | <application>zsh-&zsh-version;</application> to build with
|
---|
| 166 | <application>libcap-2.x</application> (x > 23).</para>
|
---|
[90f9400] | 167 |
|
---|
[6eff6e1] | 168 | <para><parameter>--sysconfdir=/etc/zsh</parameter> and
|
---|
| 169 | <parameter>--enable-etcdir=/etc/zsh</parameter>: These parameters are
|
---|
[f17b2db] | 170 | used so that all the <application>zsh</application> configuration files
|
---|
[6eff6e1] | 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>
|
---|
[fd7e0ed6] | 175 |
|
---|
[410e228b] | 176 | <para><parameter>--bindir=/bin</parameter>: This parameter places the
|
---|
[fcf4b970] | 177 | <command>zsh</command> binaries into the root filesystem.</para>
|
---|
| 178 |
|
---|
[4938dadc] | 179 | <para><option>--enable-cap</option>: This option enables
|
---|
[fcf4b970] | 180 | POSIX capabilities.</para>
|
---|
| 181 |
|
---|
[4938dadc] | 182 | <para><option>--disable-gdbm</option>: This option disables the
|
---|
[caa0c15] | 183 | use of the <application>GDBM</application> library.</para>
|
---|
| 184 |
|
---|
[795c0a0] | 185 | <para><option>--enable-pcre</option>: This option allows zsh to use
|
---|
| 186 | the <application>PCRE</application> regular expression library in shell
|
---|
[caa0c15] | 187 | builtins.</para>
|
---|
[a41f643] | 188 |
|
---|
[caa0c15] | 189 | <sect3 id="mountpoints">
|
---|
| 190 | <title>Multiple partitions</title>
|
---|
[a41f643] | 191 |
|
---|
[f17b2db] | 192 | <para>Linking <application>zsh</application> dynamically against
|
---|
| 193 | <application>pcre</application> and/or <application>gdbm</application>
|
---|
[caa0c15] | 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
|
---|
[f17b2db] | 199 | and <application>zsh</application> needs to be available in boot time,
|
---|
[caa0c15] | 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 &&
|
---|
| 205 | ln -v -sf ../../lib/libpcre.so.0 /usr/lib/libpcre.so
|
---|
| 206 |
|
---|
| 207 | mv -v /usr/lib/libgdbm.so.* /lib &&
|
---|
| 208 | ln -v -sf ../../lib/libgdbm.so.3 /usr/lib/libgdbm.so</userinput>
|
---|
| 209 | </screen>
|
---|
| 210 |
|
---|
[f17b2db] | 211 | <para>Alternatively you can statically link <application>zsh</application>
|
---|
| 212 | against <application>pcre</application> and <application>gdbm</application>
|
---|
[caa0c15] | 213 | if you modify the <filename>config.modules</filename> file (you need first
|
---|
| 214 | to run configure to generate it).</para>
|
---|
| 215 |
|
---|
| 216 | </sect3>
|
---|
[b7c5379] | 217 |
|
---|
[a6a160b] | 218 | </sect2>
|
---|
| 219 |
|
---|
| 220 | <sect2 role="configuration">
|
---|
[f17b2db] | 221 | <title>Configuring zsh</title>
|
---|
[a6a160b] | 222 |
|
---|
| 223 | <sect3 id="zsh-config">
|
---|
| 224 | <title>Config Files</title>
|
---|
| 225 |
|
---|
| 226 | <para>There are a whole host of configuration files for
|
---|
[f17b2db] | 227 | <application>zsh</application> including
|
---|
[6eff6e1] | 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>.
|
---|
[a6a160b] | 233 | You can find more information on these in the <filename>zsh(1)</filename>
|
---|
[6eff6e1] | 234 | and related manual pages.</para>
|
---|
[a6a160b] | 235 |
|
---|
[37b6e78] | 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><prompt-name></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 |
|
---|
[a6a160b] | 257 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 258 | <primary sortas="e-etc-zsh-zshenv">/etc/zsh/zshenv</primary>
|
---|
[a6a160b] | 259 | </indexterm>
|
---|
| 260 |
|
---|
| 261 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 262 | <primary sortas="e-etc-zsh-zprofile">/etc/zsh/zprofile</primary>
|
---|
[a6a160b] | 263 | </indexterm>
|
---|
| 264 |
|
---|
| 265 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 266 | <primary sortas="e-etc-zsh-zshrc">/etc/zsh/zshrc</primary>
|
---|
[a6a160b] | 267 | </indexterm>
|
---|
| 268 |
|
---|
| 269 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 270 | <primary sortas="e-etc-zsh-zlogin">/etc/zsh/zlogin</primary>
|
---|
[a6a160b] | 271 | </indexterm>
|
---|
| 272 |
|
---|
| 273 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 274 | <primary sortas="e-etc-zsh-zlogout">/etc/zsh/zlogout</primary>
|
---|
[a6a160b] | 275 | </indexterm>
|
---|
| 276 |
|
---|
| 277 | </sect3>
|
---|
| 278 |
|
---|
[5ef8b741] | 279 | <sect3>
|
---|
| 280 | <title>Configuration Information</title>
|
---|
| 281 |
|
---|
| 282 | <para>Update <filename>/etc/shells</filename> to include the
|
---|
[f17b2db] | 283 | <application>zsh</application> shell program names (as the
|
---|
[5ef8b741] | 284 | <systemitem class="username">root</systemitem> user):</para>
|
---|
| 285 |
|
---|
| 286 | <screen role="root"><userinput>cat >> /etc/shells << "EOF"
|
---|
[fcf4b970] | 287 | <literal>/bin/zsh
|
---|
| 288 | /bin/zsh-&zsh-version;</literal>
|
---|
[5ef8b741] | 289 | EOF</userinput></screen>
|
---|
| 290 |
|
---|
| 291 | </sect3>
|
---|
| 292 |
|
---|
[a6a160b] | 293 | </sect2>
|
---|
| 294 |
|
---|
| 295 | <sect2 role="content">
|
---|
| 296 | <title>Contents</title>
|
---|
| 297 |
|
---|
| 298 | <segmentedlist>
|
---|
[5ef8b741] | 299 | <segtitle>Installed Programs</segtitle>
|
---|
[a6a160b] | 300 | <segtitle>Installed Libraries</segtitle>
|
---|
| 301 | <segtitle>Installed Directories</segtitle>
|
---|
| 302 |
|
---|
| 303 | <seglistitem>
|
---|
[36e088d] | 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>
|
---|
[6eff6e1] | 307 | <seg>/etc/zsh, /usr/lib/zsh, /usr/share/doc/zsh-&zsh-version; and
|
---|
| 308 | /usr/share/zsh</seg>
|
---|
[a6a160b] | 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>
|
---|
[1aa3a3ca] | 328 |
|
---|
[a6a160b] | 329 | </variablelist>
|
---|
| 330 |
|
---|
| 331 | </sect2>
|
---|
| 332 |
|
---|
| 333 | </sect1>
|
---|