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