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