[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">
|
---|
[cdabd810] | 84 | <ulink url="ftp://ftp.gnu.org/gnu/gdbm/">gdbm</ulink>,
|
---|
[56605b9] | 85 | <xref linkend="pcre"/>, and
|
---|
| 86 | <xref linkend="libcap-pam"/>
|
---|
[fcf4b970] | 87 | </para>
|
---|
[a6a160b] | 88 |
|
---|
[3597eb6] | 89 | <para condition="html" role="usernotes">User Notes:
|
---|
| 90 | <ulink url="&blfs-wiki;/zsh"/></para>
|
---|
| 91 |
|
---|
[a6a160b] | 92 | </sect2>
|
---|
| 93 |
|
---|
| 94 | <sect2 role="installation">
|
---|
[f17b2db] | 95 | <title>Installation of zsh</title>
|
---|
[a6a160b] | 96 |
|
---|
[98078a63] | 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>
|
---|
[6eff6e1] | 101 |
|
---|
[37b6e78] | 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 |
|
---|
[f17b2db] | 110 | <para>Install <application>zsh</application> by running the following
|
---|
[a6a160b] | 111 | commands:</para>
|
---|
| 112 |
|
---|
[cdabd810] | 113 | <screen><userinput>sed -e '/attr.mdh/ d' -e '/attr.pro/ d' \
|
---|
| 114 | -e '/include <sys\/xattr.h>/ a\\n#include "attr.mdh"\n#include "attr.pro"' \
|
---|
| 115 | -i Src/Modules/attr.c &&
|
---|
| 116 |
|
---|
| 117 | ./configure --prefix=/usr \
|
---|
[ca17955] | 118 | --bindir=/bin \
|
---|
[6eff6e1] | 119 | --sysconfdir=/etc/zsh \
|
---|
[ca17955] | 120 | --enable-etcdir=/etc/zsh &&
|
---|
| 121 | make &&
|
---|
[a6a160b] | 122 |
|
---|
[ca17955] | 123 | makeinfo Doc/zsh.texi --html -o Doc/html &&
|
---|
| 124 | makeinfo Doc/zsh.texi --html --no-split --no-headers \
|
---|
| 125 | -o Doc/zsh.html &&
|
---|
[6eff6e1] | 126 | makeinfo Doc/zsh.texi --plaintext -o Doc/zsh.txt</userinput></screen>
|
---|
| 127 |
|
---|
[8aeb474] | 128 | <para>If you have <xref linkend="texlive"/>
|
---|
[f1e103a] | 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 |
|
---|
[5ef8b741] | 134 | <para>To test the results, issue: <command>make check</command>.</para>
|
---|
| 135 |
|
---|
[a6a160b] | 136 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 137 |
|
---|
[5ef8b741] | 138 | <screen role="root"><userinput>make install &&
|
---|
[f1e103a] | 139 | make infodir=/usr/share/info install.info
|
---|
| 140 |
|
---|
| 141 | install -v -m755 -d /usr/share/doc/zsh-&zsh-version;/html &&
|
---|
| 142 | install -v -m644 Doc/html/* \
|
---|
| 143 | /usr/share/doc/zsh-&zsh-version;/html &&
|
---|
| 144 | install -v -m644 Doc/zsh.{html,txt} \
|
---|
| 145 | /usr/share/doc/zsh-&zsh-version;</userinput></screen>
|
---|
[6eff6e1] | 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 &&
|
---|
[fcf4b970] | 152 | install -v -m644 Doc/zsh.dvi /usr/share/doc/zsh-&zsh-version;</userinput></screen>
|
---|
[6eff6e1] | 153 |
|
---|
[f1e103a] | 154 | <para>If you built the PDF format of the documentation, install
|
---|
| 155 | it by issuing the following command as the
|
---|
[6eff6e1] | 156 | <systemitem class="username">root</systemitem> user:</para>
|
---|
| 157 |
|
---|
[f1e103a] | 158 | <screen role="root"><userinput>install -v -m644 Doc/zsh.pdf \
|
---|
[6eff6e1] | 159 | /usr/share/doc/zsh-&zsh-version;</userinput></screen>
|
---|
| 160 |
|
---|
| 161 | </sect2>
|
---|
| 162 |
|
---|
| 163 | <sect2 role="commands">
|
---|
| 164 | <title>Command Explanations</title>
|
---|
[29f80ebc] | 165 |
|
---|
[90f9400] | 166 | <para><command>sed ... Src/Modules/attr.c</command>: Fix
|
---|
[795c0a0] | 167 | <application>zsh-&zsh-version;</application> to build with
|
---|
| 168 | <application>libcap-2.x</application> (x > 23).</para>
|
---|
[90f9400] | 169 |
|
---|
[6eff6e1] | 170 | <para><parameter>--sysconfdir=/etc/zsh</parameter> and
|
---|
| 171 | <parameter>--enable-etcdir=/etc/zsh</parameter>: These parameters are
|
---|
[f17b2db] | 172 | used so that all the <application>zsh</application> configuration files
|
---|
[6eff6e1] | 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>
|
---|
[fd7e0ed6] | 177 |
|
---|
[410e228b] | 178 | <para><parameter>--bindir=/bin</parameter>: This parameter places the
|
---|
[fcf4b970] | 179 | <command>zsh</command> binaries into the root filesystem.</para>
|
---|
| 180 |
|
---|
[4938dadc] | 181 | <para><option>--enable-cap</option>: This option enables
|
---|
[fcf4b970] | 182 | POSIX capabilities.</para>
|
---|
| 183 |
|
---|
[4938dadc] | 184 | <para><option>--disable-gdbm</option>: This option disables the
|
---|
[caa0c15] | 185 | use of the <application>GDBM</application> library.</para>
|
---|
| 186 |
|
---|
[795c0a0] | 187 | <para><option>--enable-pcre</option>: This option allows zsh to use
|
---|
| 188 | the <application>PCRE</application> regular expression library in shell
|
---|
[caa0c15] | 189 | builtins.</para>
|
---|
[a41f643] | 190 |
|
---|
[caa0c15] | 191 | <sect3 id="mountpoints">
|
---|
| 192 | <title>Multiple partitions</title>
|
---|
[a41f643] | 193 |
|
---|
[f17b2db] | 194 | <para>Linking <application>zsh</application> dynamically against
|
---|
| 195 | <application>pcre</application> and/or <application>gdbm</application>
|
---|
[caa0c15] | 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
|
---|
[f17b2db] | 201 | and <application>zsh</application> needs to be available in boot time,
|
---|
[caa0c15] | 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 &&
|
---|
| 207 | ln -v -sf ../../lib/libpcre.so.0 /usr/lib/libpcre.so
|
---|
| 208 |
|
---|
| 209 | mv -v /usr/lib/libgdbm.so.* /lib &&
|
---|
| 210 | ln -v -sf ../../lib/libgdbm.so.3 /usr/lib/libgdbm.so</userinput>
|
---|
| 211 | </screen>
|
---|
| 212 |
|
---|
[f17b2db] | 213 | <para>Alternatively you can statically link <application>zsh</application>
|
---|
| 214 | against <application>pcre</application> and <application>gdbm</application>
|
---|
[caa0c15] | 215 | if you modify the <filename>config.modules</filename> file (you need first
|
---|
| 216 | to run configure to generate it).</para>
|
---|
| 217 |
|
---|
| 218 | </sect3>
|
---|
[b7c5379] | 219 |
|
---|
[a6a160b] | 220 | </sect2>
|
---|
| 221 |
|
---|
| 222 | <sect2 role="configuration">
|
---|
[f17b2db] | 223 | <title>Configuring zsh</title>
|
---|
[a6a160b] | 224 |
|
---|
| 225 | <sect3 id="zsh-config">
|
---|
| 226 | <title>Config Files</title>
|
---|
| 227 |
|
---|
| 228 | <para>There are a whole host of configuration files for
|
---|
[f17b2db] | 229 | <application>zsh</application> including
|
---|
[6eff6e1] | 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>.
|
---|
[a6a160b] | 235 | You can find more information on these in the <filename>zsh(1)</filename>
|
---|
[6eff6e1] | 236 | and related manual pages.</para>
|
---|
[a6a160b] | 237 |
|
---|
[37b6e78] | 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><prompt-name></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 |
|
---|
[a6a160b] | 259 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 260 | <primary sortas="e-etc-zsh-zshenv">/etc/zsh/zshenv</primary>
|
---|
[a6a160b] | 261 | </indexterm>
|
---|
| 262 |
|
---|
| 263 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 264 | <primary sortas="e-etc-zsh-zprofile">/etc/zsh/zprofile</primary>
|
---|
[a6a160b] | 265 | </indexterm>
|
---|
| 266 |
|
---|
| 267 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 268 | <primary sortas="e-etc-zsh-zshrc">/etc/zsh/zshrc</primary>
|
---|
[a6a160b] | 269 | </indexterm>
|
---|
| 270 |
|
---|
| 271 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 272 | <primary sortas="e-etc-zsh-zlogin">/etc/zsh/zlogin</primary>
|
---|
[a6a160b] | 273 | </indexterm>
|
---|
| 274 |
|
---|
| 275 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 276 | <primary sortas="e-etc-zsh-zlogout">/etc/zsh/zlogout</primary>
|
---|
[a6a160b] | 277 | </indexterm>
|
---|
| 278 |
|
---|
| 279 | </sect3>
|
---|
| 280 |
|
---|
[5ef8b741] | 281 | <sect3>
|
---|
| 282 | <title>Configuration Information</title>
|
---|
| 283 |
|
---|
| 284 | <para>Update <filename>/etc/shells</filename> to include the
|
---|
[f17b2db] | 285 | <application>zsh</application> shell program names (as the
|
---|
[5ef8b741] | 286 | <systemitem class="username">root</systemitem> user):</para>
|
---|
| 287 |
|
---|
| 288 | <screen role="root"><userinput>cat >> /etc/shells << "EOF"
|
---|
[fcf4b970] | 289 | <literal>/bin/zsh
|
---|
| 290 | /bin/zsh-&zsh-version;</literal>
|
---|
[5ef8b741] | 291 | EOF</userinput></screen>
|
---|
| 292 |
|
---|
| 293 | </sect3>
|
---|
| 294 |
|
---|
[a6a160b] | 295 | </sect2>
|
---|
| 296 |
|
---|
| 297 | <sect2 role="content">
|
---|
| 298 | <title>Contents</title>
|
---|
| 299 |
|
---|
| 300 | <segmentedlist>
|
---|
[5ef8b741] | 301 | <segtitle>Installed Programs</segtitle>
|
---|
[a6a160b] | 302 | <segtitle>Installed Libraries</segtitle>
|
---|
| 303 | <segtitle>Installed Directories</segtitle>
|
---|
| 304 |
|
---|
| 305 | <seglistitem>
|
---|
[36e088d] | 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>
|
---|
[6eff6e1] | 309 | <seg>/etc/zsh, /usr/lib/zsh, /usr/share/doc/zsh-&zsh-version; and
|
---|
| 310 | /usr/share/zsh</seg>
|
---|
[a6a160b] | 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>
|
---|
[1aa3a3ca] | 330 |
|
---|
[a6a160b] | 331 | </variablelist>
|
---|
| 332 |
|
---|
| 333 | </sect2>
|
---|
| 334 |
|
---|
| 335 | </sect1>
|
---|