[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 |
|
---|
[a8f0cdf] | 42 | &lfs74_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">
|
---|
| 84 | <xref linkend="pcre"/> and
|
---|
[68876b7] | 85 | <xref linkend="libcap"/>
|
---|
[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 |
|
---|
[37b6e78] | 101 | <note>
|
---|
| 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
|
---|
| 105 | the switch --with-tcsetpgrp to configure.
|
---|
| 106 | </para>
|
---|
| 107 | </note>
|
---|
| 108 |
|
---|
[f17b2db] | 109 | <para>Install <application>zsh</application> by running the following
|
---|
[a6a160b] | 110 | commands:</para>
|
---|
| 111 |
|
---|
[4938dadc] | 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 |
|
---|
[ca17955] | 118 | makeinfo Doc/zsh.texi --html -o Doc/html &&
|
---|
| 119 | makeinfo Doc/zsh.texi --html --no-split --no-headers \
|
---|
| 120 | -o Doc/zsh.html &&
|
---|
[6eff6e1] | 121 | makeinfo Doc/zsh.texi --plaintext -o Doc/zsh.txt</userinput></screen>
|
---|
| 122 |
|
---|
[8aeb474] | 123 | <para>If you have <xref linkend="texlive"/>
|
---|
[f1e103a] | 124 | installed, you can build PDF format of the documentation by issuing
|
---|
| 125 | the following command:</para>
|
---|
| 126 |
|
---|
| 127 | <screen><userinput>texi2pdf Doc/zsh.texi -o Doc/zsh.pdf</userinput></screen>
|
---|
| 128 |
|
---|
[5ef8b741] | 129 | <para>To test the results, issue: <command>make check</command>.</para>
|
---|
| 130 |
|
---|
[a6a160b] | 131 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 132 |
|
---|
[5ef8b741] | 133 | <screen role="root"><userinput>make install &&
|
---|
[f1e103a] | 134 | make infodir=/usr/share/info install.info
|
---|
| 135 |
|
---|
| 136 | install -v -m755 -d /usr/share/doc/zsh-&zsh-version;/html &&
|
---|
| 137 | install -v -m644 Doc/html/* \
|
---|
| 138 | /usr/share/doc/zsh-&zsh-version;/html &&
|
---|
| 139 | install -v -m644 Doc/zsh.{html,txt} \
|
---|
| 140 | /usr/share/doc/zsh-&zsh-version;</userinput></screen>
|
---|
[6eff6e1] | 141 |
|
---|
| 142 | <para>If you downloaded the optional documentation, install it by issuing
|
---|
| 143 | the following commands as the
|
---|
| 144 | <systemitem class="username">root</systemitem> user:</para>
|
---|
| 145 |
|
---|
| 146 | <screen role="root"><userinput>make htmldir=/usr/share/doc/zsh-&zsh-version;/html install.html &&
|
---|
[fcf4b970] | 147 | install -v -m644 Doc/zsh.dvi /usr/share/doc/zsh-&zsh-version;</userinput></screen>
|
---|
[6eff6e1] | 148 |
|
---|
[f1e103a] | 149 | <para>If you built the PDF format of the documentation, install
|
---|
| 150 | it by issuing the following command as the
|
---|
[6eff6e1] | 151 | <systemitem class="username">root</systemitem> user:</para>
|
---|
| 152 |
|
---|
[f1e103a] | 153 | <screen role="root"><userinput>install -v -m644 Doc/zsh.pdf \
|
---|
[6eff6e1] | 154 | /usr/share/doc/zsh-&zsh-version;</userinput></screen>
|
---|
| 155 |
|
---|
| 156 | </sect2>
|
---|
| 157 |
|
---|
| 158 | <sect2 role="commands">
|
---|
| 159 | <title>Command Explanations</title>
|
---|
[29f80ebc] | 160 |
|
---|
[6eff6e1] | 161 | <para><parameter>--sysconfdir=/etc/zsh</parameter> and
|
---|
| 162 | <parameter>--enable-etcdir=/etc/zsh</parameter>: These parameters are
|
---|
[f17b2db] | 163 | used so that all the <application>zsh</application> configuration files
|
---|
[6eff6e1] | 164 | are consolidated into the <filename class='directory'>/etc/zsh</filename>
|
---|
| 165 | directory. Omit these parameters if you wish to retain historical
|
---|
| 166 | compatibility by having all the files located in the
|
---|
| 167 | <filename class='directory'>/etc</filename> directory.</para>
|
---|
[fd7e0ed6] | 168 |
|
---|
[410e228b] | 169 | <para><parameter>--bindir=/bin</parameter>: This parameter places the
|
---|
[fcf4b970] | 170 | <command>zsh</command> binaries into the root filesystem.</para>
|
---|
| 171 |
|
---|
[4938dadc] | 172 | <para><option>--enable-cap</option>: This option enables
|
---|
[fcf4b970] | 173 | POSIX capabilities.</para>
|
---|
| 174 |
|
---|
[4938dadc] | 175 | <para><option>--disable-gdbm</option>: This option disables the
|
---|
[caa0c15] | 176 | use of the <application>GDBM</application> library.</para>
|
---|
| 177 |
|
---|
[4938dadc] | 178 | <para><option>--enable-pcre</option>: This option allows to use
|
---|
[f17b2db] | 179 | the <application>pcre</application> regular expression library in shell
|
---|
[caa0c15] | 180 | builtins.</para>
|
---|
[a41f643] | 181 |
|
---|
[caa0c15] | 182 | <sect3 id="mountpoints">
|
---|
| 183 | <title>Multiple partitions</title>
|
---|
[a41f643] | 184 |
|
---|
[f17b2db] | 185 | <para>Linking <application>zsh</application> dynamically against
|
---|
| 186 | <application>pcre</application> and/or <application>gdbm</application>
|
---|
[caa0c15] | 187 | produces runtime dependencies on <filename class='libraryfile'>
|
---|
| 188 | libpcre.so</filename> and/or <filename class='libraryfile'>libgdbm.so
|
---|
| 189 | </filename>respectively, which both reside in
|
---|
| 190 | <filename class='directory'>/usr</filename> hierarchy. If
|
---|
| 191 | <filename class='directory'>/usr</filename> is a separate mount point
|
---|
[f17b2db] | 192 | and <application>zsh</application> needs to be available in boot time,
|
---|
[caa0c15] | 193 | then its supporting libraries should be in
|
---|
| 194 | <filename class='directory'>/lib</filename> too. You can move the
|
---|
| 195 | libraries as follows:</para>
|
---|
| 196 |
|
---|
| 197 | <screen role="root"><userinput>mv -v /usr/lib/libpcre.so.* /lib &&
|
---|
| 198 | ln -v -sf ../../lib/libpcre.so.0 /usr/lib/libpcre.so
|
---|
| 199 |
|
---|
| 200 | mv -v /usr/lib/libgdbm.so.* /lib &&
|
---|
| 201 | ln -v -sf ../../lib/libgdbm.so.3 /usr/lib/libgdbm.so</userinput>
|
---|
| 202 | </screen>
|
---|
| 203 |
|
---|
[f17b2db] | 204 | <para>Alternatively you can statically link <application>zsh</application>
|
---|
| 205 | against <application>pcre</application> and <application>gdbm</application>
|
---|
[caa0c15] | 206 | if you modify the <filename>config.modules</filename> file (you need first
|
---|
| 207 | to run configure to generate it).</para>
|
---|
| 208 |
|
---|
| 209 | </sect3>
|
---|
[b7c5379] | 210 |
|
---|
[a6a160b] | 211 | </sect2>
|
---|
| 212 |
|
---|
| 213 | <sect2 role="configuration">
|
---|
[f17b2db] | 214 | <title>Configuring zsh</title>
|
---|
[a6a160b] | 215 |
|
---|
| 216 | <sect3 id="zsh-config">
|
---|
| 217 | <title>Config Files</title>
|
---|
| 218 |
|
---|
| 219 | <para>There are a whole host of configuration files for
|
---|
[f17b2db] | 220 | <application>zsh</application> including
|
---|
[6eff6e1] | 221 | <filename>/etc/zsh/zshenv</filename>,
|
---|
| 222 | <filename>/etc/zsh/zprofile</filename>,
|
---|
| 223 | <filename>/etc/zsh/zshrc</filename>,
|
---|
| 224 | <filename>/etc/zsh/zlogin</filename> and
|
---|
| 225 | <filename>/etc/zsh/zlogout</filename>.
|
---|
[a6a160b] | 226 | You can find more information on these in the <filename>zsh(1)</filename>
|
---|
[6eff6e1] | 227 | and related manual pages.</para>
|
---|
[a6a160b] | 228 |
|
---|
[37b6e78] | 229 | <para>
|
---|
| 230 | The first time zsh is executed, you will be prompted by messages asking
|
---|
| 231 | several questions. The answers will be used to create a
|
---|
| 232 | <filename>~/.zshrc</filename> file. If you wish to run these questions
|
---|
| 233 | again, run <command>zsh
|
---|
| 234 | /usr/share/zsh/&zsh-version;/functions/zsh-newuser-install -f</command>.
|
---|
| 235 | </para>
|
---|
| 236 |
|
---|
| 237 | <para>
|
---|
| 238 | There are several built-in advanced prompts. In the
|
---|
| 239 | <command>zsh</command> shell, start advanced prompt support with
|
---|
| 240 | <command>autoload -U promptinit</command>, then
|
---|
| 241 | <command>promptinit</command>. Available prompt names are listed with
|
---|
| 242 | <command>prompt -l</command>. Select a particular one with
|
---|
| 243 | <command>prompt <literal><prompt-name></literal></command>. Display all available
|
---|
| 244 | prompts with <command>prompt -p</command>. Except for the list and
|
---|
| 245 | display commands above, you can insert the other ones in
|
---|
| 246 | <filename>~/.zshrc</filename> to be automatically executed at
|
---|
| 247 | shell start, with the prompt you chose.
|
---|
| 248 | </para>
|
---|
| 249 |
|
---|
[a6a160b] | 250 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 251 | <primary sortas="e-etc-zsh-zshenv">/etc/zsh/zshenv</primary>
|
---|
[a6a160b] | 252 | </indexterm>
|
---|
| 253 |
|
---|
| 254 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 255 | <primary sortas="e-etc-zsh-zprofile">/etc/zsh/zprofile</primary>
|
---|
[a6a160b] | 256 | </indexterm>
|
---|
| 257 |
|
---|
| 258 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 259 | <primary sortas="e-etc-zsh-zshrc">/etc/zsh/zshrc</primary>
|
---|
[a6a160b] | 260 | </indexterm>
|
---|
| 261 |
|
---|
| 262 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 263 | <primary sortas="e-etc-zsh-zlogin">/etc/zsh/zlogin</primary>
|
---|
[a6a160b] | 264 | </indexterm>
|
---|
| 265 |
|
---|
| 266 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 267 | <primary sortas="e-etc-zsh-zlogout">/etc/zsh/zlogout</primary>
|
---|
[a6a160b] | 268 | </indexterm>
|
---|
| 269 |
|
---|
| 270 | </sect3>
|
---|
| 271 |
|
---|
[5ef8b741] | 272 | <sect3>
|
---|
| 273 | <title>Configuration Information</title>
|
---|
| 274 |
|
---|
| 275 | <para>Update <filename>/etc/shells</filename> to include the
|
---|
[f17b2db] | 276 | <application>zsh</application> shell program names (as the
|
---|
[5ef8b741] | 277 | <systemitem class="username">root</systemitem> user):</para>
|
---|
| 278 |
|
---|
| 279 | <screen role="root"><userinput>cat >> /etc/shells << "EOF"
|
---|
[fcf4b970] | 280 | <literal>/bin/zsh
|
---|
| 281 | /bin/zsh-&zsh-version;</literal>
|
---|
[5ef8b741] | 282 | EOF</userinput></screen>
|
---|
| 283 |
|
---|
| 284 | </sect3>
|
---|
| 285 |
|
---|
[a6a160b] | 286 | </sect2>
|
---|
| 287 |
|
---|
| 288 | <sect2 role="content">
|
---|
| 289 | <title>Contents</title>
|
---|
| 290 |
|
---|
| 291 | <segmentedlist>
|
---|
[5ef8b741] | 292 | <segtitle>Installed Programs</segtitle>
|
---|
[a6a160b] | 293 | <segtitle>Installed Libraries</segtitle>
|
---|
| 294 | <segtitle>Installed Directories</segtitle>
|
---|
| 295 |
|
---|
| 296 | <seglistitem>
|
---|
[36e088d] | 297 | <seg>zsh (hardlink to zsh-&zsh-version;) and zsh-&zsh-version;</seg>
|
---|
| 298 | <seg>Numerous plugin helper modules under
|
---|
| 299 | /usr/lib/zsh/&zsh-version;/</seg>
|
---|
[6eff6e1] | 300 | <seg>/etc/zsh, /usr/lib/zsh, /usr/share/doc/zsh-&zsh-version; and
|
---|
| 301 | /usr/share/zsh</seg>
|
---|
[a6a160b] | 302 | </seglistitem>
|
---|
| 303 | </segmentedlist>
|
---|
| 304 |
|
---|
| 305 | <variablelist>
|
---|
| 306 | <bridgehead renderas="sect3">Short Description</bridgehead>
|
---|
| 307 | <?dbfo list-presentation="list"?>
|
---|
| 308 | <?dbhtml list-presentation="table"?>
|
---|
| 309 |
|
---|
| 310 | <varlistentry id="zsh-prog">
|
---|
| 311 | <term><command>zsh</command></term>
|
---|
| 312 | <listitem>
|
---|
| 313 | <para>is a shell which has command-line editing, built-in spelling
|
---|
| 314 | correction, programmable command completion, shell functions (with
|
---|
| 315 | autoloading), a history mechanism, and a host of other features.</para>
|
---|
| 316 | <indexterm zone="zsh zsh-prog">
|
---|
| 317 | <primary sortas="b-zsh">zsh</primary>
|
---|
| 318 | </indexterm>
|
---|
| 319 | </listitem>
|
---|
| 320 | </varlistentry>
|
---|
[1aa3a3ca] | 321 |
|
---|
[a6a160b] | 322 | </variablelist>
|
---|
| 323 |
|
---|
| 324 | </sect2>
|
---|
| 325 |
|
---|
| 326 | </sect1>
|
---|