[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 |
|
---|
[864abc6] | 7 | <!ENTITY zsh-download-http "http://www.zsh.org/pub/zsh-&zsh-version;.tar.xz">
|
---|
[8070ffce] | 8 | <!ENTITY zsh-download-ftp " ">
|
---|
[56229a7e] | 9 | <!ENTITY zsh-md5sum "e02a5428620b3dd268800c7843b3dd4d">
|
---|
[fccc8d97] | 10 | <!ENTITY zsh-size "3.0 MB">
|
---|
[56229a7e] | 11 | <!ENTITY zsh-buildsize "72 MB (includes documentation and tests)">
|
---|
| 12 | <!ENTITY zsh-time "1.3 SBU (Using parallelism=4; includes documentation and tests)">
|
---|
[6eff6e1] | 13 |
|
---|
[56229a7e] | 14 | <!ENTITY zsh-doc-md5sum "ef8514401a81bb1a4c4b655ebda8a1a2">
|
---|
[fccc8d97] | 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 |
|
---|
[f716ef4] | 35 | <para>
|
---|
| 36 | The <application>zsh</application> package contains a command
|
---|
| 37 | interpreter (shell) usable as an interactive login shell and as
|
---|
| 38 | a shell script command processor. Of the standard shells,
|
---|
| 39 | <application>zsh</application> most closely resembles
|
---|
| 40 | <application>ksh</application> but includes many enhancements.
|
---|
| 41 | </para>
|
---|
[a6a160b] | 42 |
|
---|
[64218c2] | 43 | &lfs10_checked;
|
---|
[6eff6e1] | 44 |
|
---|
[a6a160b] | 45 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 46 | <itemizedlist spacing="compact">
|
---|
| 47 | <listitem>
|
---|
[f716ef4] | 48 | <para>
|
---|
| 49 | Download (HTTP): <ulink url="&zsh-download-http;"/>
|
---|
| 50 | </para>
|
---|
[a6a160b] | 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
[f716ef4] | 53 | <para>
|
---|
| 54 | Download (FTP): <ulink url="&zsh-download-ftp;"/>
|
---|
| 55 | </para>
|
---|
[a6a160b] | 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
[f716ef4] | 58 | <para>
|
---|
| 59 | Download MD5 sum: &zsh-md5sum;
|
---|
| 60 | </para>
|
---|
[a6a160b] | 61 | </listitem>
|
---|
| 62 | <listitem>
|
---|
[f716ef4] | 63 | <para>
|
---|
| 64 | Download size: &zsh-size;
|
---|
| 65 | </para>
|
---|
[a6a160b] | 66 | </listitem>
|
---|
| 67 | <listitem>
|
---|
[f716ef4] | 68 | <para>
|
---|
| 69 | Estimated disk space required: &zsh-buildsize;
|
---|
| 70 | </para>
|
---|
[a6a160b] | 71 | </listitem>
|
---|
| 72 | <listitem>
|
---|
[f716ef4] | 73 | <para>
|
---|
| 74 | Estimated build time: &zsh-time;
|
---|
| 75 | </para>
|
---|
[a6a160b] | 76 | </listitem>
|
---|
| 77 | </itemizedlist>
|
---|
| 78 |
|
---|
[6eff6e1] | 79 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
[29f80ebc] | 80 | <itemizedlist spacing="compact">
|
---|
| 81 | <listitem>
|
---|
[f716ef4] | 82 | <para>
|
---|
| 83 | Optional Documentation: <ulink
|
---|
| 84 | url="http://www.zsh.org/pub/zsh-&zsh-version;-doc.tar.xz"/>
|
---|
| 85 | </para>
|
---|
[6eff6e1] | 86 | </listitem>
|
---|
[29f80ebc] | 87 | <listitem>
|
---|
[f716ef4] | 88 | <para>
|
---|
| 89 | Documentation MD5 sum: &zsh-doc-md5sum;
|
---|
| 90 | </para>
|
---|
[6eff6e1] | 91 | </listitem>
|
---|
[37b6e78] | 92 | <listitem>
|
---|
[f716ef4] | 93 | <para>
|
---|
| 94 | Documentation download size: &zsh-doc-size;
|
---|
| 95 | </para>
|
---|
[37b6e78] | 96 | </listitem>
|
---|
[6eff6e1] | 97 | </itemizedlist>
|
---|
| 98 |
|
---|
[1590eb9] | 99 | <note>
|
---|
| 100 | <para>
|
---|
| 101 | When there is a new <application>zsh</application> release, the old
|
---|
| 102 | files shown above are moved to a new server directory:
|
---|
| 103 | <ulink url="http://www.zsh.org/pub/old/"/>.
|
---|
| 104 | </para>
|
---|
| 105 | </note>
|
---|
| 106 |
|
---|
[f17b2db] | 107 | <bridgehead renderas="sect3">zsh Dependencies</bridgehead>
|
---|
[a6a160b] | 108 |
|
---|
| 109 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[ca17955] | 110 | <para role="optional">
|
---|
[8f1fc267] | 111 | <xref linkend="libcap-pam"/>,
|
---|
[56605b9] | 112 | <xref linkend="pcre"/>, and
|
---|
[8f1fc267] | 113 | <xref linkend="valgrind"/>,
|
---|
[fcf4b970] | 114 | </para>
|
---|
[a6a160b] | 115 |
|
---|
[3597eb6] | 116 | <para condition="html" role="usernotes">User Notes:
|
---|
| 117 | <ulink url="&blfs-wiki;/zsh"/></para>
|
---|
| 118 |
|
---|
[a6a160b] | 119 | </sect2>
|
---|
| 120 |
|
---|
| 121 | <sect2 role="installation">
|
---|
[f17b2db] | 122 | <title>Installation of zsh</title>
|
---|
[a6a160b] | 123 |
|
---|
[f716ef4] | 124 | <para>
|
---|
| 125 | If you downloaded the optional documentation, unpack it with
|
---|
| 126 | the following command:
|
---|
| 127 | </para>
|
---|
[98078a63] | 128 |
|
---|
[8763a1da] | 129 | <screen><userinput>tar --strip-components=1 -xvf ../zsh-&zsh-version;-doc.tar.xz</userinput></screen>
|
---|
[6eff6e1] | 130 |
|
---|
[8f1fc267] | 131 | <!-- <note>
|
---|
[37b6e78] | 132 | <para>
|
---|
| 133 | Using a script to build with "su -c script" may produce a funny
|
---|
| 134 | configure error message: "no controlling tty". If this happens, add
|
---|
[8f1fc267] | 135 | the switch -\-with-tcsetpgrp to configure.
|
---|
[37b6e78] | 136 | </para>
|
---|
| 137 | </note>
|
---|
[8f1fc267] | 138 | -->
|
---|
[f716ef4] | 139 | <para>
|
---|
| 140 | Install <application>zsh</application> by running the following
|
---|
| 141 | commands:
|
---|
| 142 | </para>
|
---|
[a6a160b] | 143 |
|
---|
[bffe904] | 144 | <screen><userinput>./configure --prefix=/usr \
|
---|
[ca17955] | 145 | --bindir=/bin \
|
---|
[6eff6e1] | 146 | --sysconfdir=/etc/zsh \
|
---|
[ca17955] | 147 | --enable-etcdir=/etc/zsh &&
|
---|
| 148 | make &&
|
---|
[a6a160b] | 149 |
|
---|
[0cf6826a] | 150 | makeinfo Doc/zsh.texi --plaintext -o Doc/zsh.txt &&
|
---|
[ca17955] | 151 | makeinfo Doc/zsh.texi --html -o Doc/html &&
|
---|
[0cf6826a] | 152 | makeinfo Doc/zsh.texi --html --no-split --no-headers -o Doc/zsh.html</userinput></screen>
|
---|
[6eff6e1] | 153 |
|
---|
[f716ef4] | 154 | <para>
|
---|
| 155 | If you have <xref linkend="texlive"/>
|
---|
| 156 | installed, you can build PDF format of the documentation by issuing
|
---|
| 157 | the following command:
|
---|
| 158 | </para>
|
---|
[f1e103a] | 159 |
|
---|
[06908bf6] | 160 | <screen remap="doc"><userinput>texi2pdf Doc/zsh.texi -o Doc/zsh.pdf</userinput></screen>
|
---|
[f1e103a] | 161 |
|
---|
[f716ef4] | 162 | <para>
|
---|
| 163 | To test the results, issue: <command>make check</command>.
|
---|
| 164 | </para>
|
---|
[5ef8b741] | 165 |
|
---|
[f716ef4] | 166 | <para>
|
---|
| 167 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 168 | </para>
|
---|
[a6a160b] | 169 |
|
---|
[0cf6826a] | 170 | <screen role="root"><userinput>make install &&
|
---|
| 171 | make infodir=/usr/share/info install.info &&
|
---|
[f1e103a] | 172 |
|
---|
[0cf6826a] | 173 | install -v -m755 -d /usr/share/doc/zsh-&zsh-version;/html &&
|
---|
| 174 | install -v -m644 Doc/html/* /usr/share/doc/zsh-&zsh-version;/html &&
|
---|
| 175 | install -v -m644 Doc/zsh.{html,txt} /usr/share/doc/zsh-&zsh-version;</userinput></screen>
|
---|
[6eff6e1] | 176 |
|
---|
[f716ef4] | 177 | <para>
|
---|
| 178 | If you downloaded the optional documentation, install it by issuing
|
---|
| 179 | the following commands as the
|
---|
| 180 | <systemitem class="username">root</systemitem> user:
|
---|
| 181 | </para>
|
---|
[6eff6e1] | 182 |
|
---|
| 183 | <screen role="root"><userinput>make htmldir=/usr/share/doc/zsh-&zsh-version;/html install.html &&
|
---|
[fcf4b970] | 184 | install -v -m644 Doc/zsh.dvi /usr/share/doc/zsh-&zsh-version;</userinput></screen>
|
---|
[6eff6e1] | 185 |
|
---|
[f716ef4] | 186 | <para>
|
---|
| 187 | If you built the PDF format of the documentation, install
|
---|
| 188 | it by issuing the following command as the
|
---|
| 189 | <systemitem class="username">root</systemitem> user:
|
---|
| 190 | </para>
|
---|
[6eff6e1] | 191 |
|
---|
[06908bf6] | 192 | <screen role="root"
|
---|
| 193 | remap="doc"><userinput>install -v -m644 Doc/zsh.pdf /usr/share/doc/zsh-&zsh-version;</userinput></screen>
|
---|
[6eff6e1] | 194 |
|
---|
| 195 | </sect2>
|
---|
| 196 |
|
---|
| 197 | <sect2 role="commands">
|
---|
| 198 | <title>Command Explanations</title>
|
---|
[29f80ebc] | 199 |
|
---|
[f716ef4] | 200 | <para>
|
---|
| 201 | <parameter>--sysconfdir=/etc/zsh</parameter> and
|
---|
| 202 | <parameter>--enable-etcdir=/etc/zsh</parameter>: These parameters are
|
---|
| 203 | used so that all the <application>zsh</application> configuration files
|
---|
| 204 | are consolidated into the <filename class='directory'>/etc/zsh</filename>
|
---|
| 205 | directory. Omit these parameters if you wish to retain historical
|
---|
| 206 | compatibility by having all the files located in the
|
---|
| 207 | <filename class='directory'>/etc</filename> directory.
|
---|
| 208 | </para>
|
---|
[fd7e0ed6] | 209 |
|
---|
[f716ef4] | 210 | <para>
|
---|
| 211 | <parameter>--bindir=/bin</parameter>: This parameter places the
|
---|
| 212 | <command>zsh</command> binaries into the root filesystem.
|
---|
| 213 | </para>
|
---|
[fcf4b970] | 214 |
|
---|
[f716ef4] | 215 | <para>
|
---|
| 216 | <option>--enable-cap</option>: This option enables
|
---|
| 217 | POSIX capabilities.
|
---|
| 218 | </para>
|
---|
[fcf4b970] | 219 |
|
---|
[f716ef4] | 220 | <para>
|
---|
| 221 | <option>--disable-gdbm</option>: This option disables the
|
---|
| 222 | use of the <application>GDBM</application> library.
|
---|
| 223 | </para>
|
---|
[caa0c15] | 224 |
|
---|
[f716ef4] | 225 | <para>
|
---|
| 226 | <option>--enable-pcre</option>: This option allows zsh to use
|
---|
| 227 | the <application>PCRE</application> regular expression library in shell
|
---|
| 228 | builtins.
|
---|
| 229 | </para>
|
---|
[a41f643] | 230 |
|
---|
[caa0c15] | 231 | <sect3 id="mountpoints">
|
---|
| 232 | <title>Multiple partitions</title>
|
---|
[a41f643] | 233 |
|
---|
[f716ef4] | 234 | <para>
|
---|
| 235 | Linking <application>zsh</application> dynamically against
|
---|
| 236 | <application>pcre</application> and/or <application>gdbm</application>
|
---|
| 237 | produces runtime dependencies on <filename class='libraryfile'>
|
---|
| 238 | libpcre.so</filename> and/or <filename class='libraryfile'>libgdbm.so
|
---|
| 239 | </filename>respectively, which both reside in
|
---|
| 240 | <filename class='directory'>/usr</filename> hierarchy. If
|
---|
| 241 | <filename class='directory'>/usr</filename> is a separate mount point
|
---|
| 242 | and <application>zsh</application> needs to be available in boot time,
|
---|
| 243 | then its supporting libraries should be in
|
---|
| 244 | <filename class='directory'>/lib</filename> too. You can move the
|
---|
| 245 | libraries as follows:
|
---|
| 246 | </para>
|
---|
[caa0c15] | 247 |
|
---|
| 248 | <screen role="root"><userinput>mv -v /usr/lib/libpcre.so.* /lib &&
|
---|
| 249 | ln -v -sf ../../lib/libpcre.so.0 /usr/lib/libpcre.so
|
---|
| 250 |
|
---|
| 251 | mv -v /usr/lib/libgdbm.so.* /lib &&
|
---|
| 252 | ln -v -sf ../../lib/libgdbm.so.3 /usr/lib/libgdbm.so</userinput>
|
---|
| 253 | </screen>
|
---|
| 254 |
|
---|
[f716ef4] | 255 | <para>
|
---|
| 256 | Alternatively you can statically link <application>zsh</application>
|
---|
| 257 | against <application>pcre</application> and
|
---|
| 258 | <application>gdbm</application> if you modify the
|
---|
| 259 | <filename>config.modules</filename> file (you need first to run
|
---|
| 260 | configure to generate it).
|
---|
| 261 | </para>
|
---|
[caa0c15] | 262 |
|
---|
| 263 | </sect3>
|
---|
[b7c5379] | 264 |
|
---|
[a6a160b] | 265 | </sect2>
|
---|
| 266 |
|
---|
| 267 | <sect2 role="configuration">
|
---|
[f17b2db] | 268 | <title>Configuring zsh</title>
|
---|
[a6a160b] | 269 |
|
---|
| 270 | <sect3 id="zsh-config">
|
---|
| 271 | <title>Config Files</title>
|
---|
| 272 |
|
---|
[f716ef4] | 273 | <para>
|
---|
| 274 | There are a whole host of configuration files for
|
---|
| 275 | <application>zsh</application> including
|
---|
| 276 | <filename>/etc/zsh/zshenv</filename>,
|
---|
| 277 | <filename>/etc/zsh/zprofile</filename>,
|
---|
| 278 | <filename>/etc/zsh/zshrc</filename>,
|
---|
| 279 | <filename>/etc/zsh/zlogin</filename> and
|
---|
| 280 | <filename>/etc/zsh/zlogout</filename>.
|
---|
| 281 | You can find more information on these in the
|
---|
| 282 | <filename>zsh(1)</filename> and related manual pages.
|
---|
| 283 | </para>
|
---|
[a6a160b] | 284 |
|
---|
[37b6e78] | 285 | <para>
|
---|
| 286 | The first time zsh is executed, you will be prompted by messages asking
|
---|
[8763a1da] | 287 | several questions. The answers will be used to create a
|
---|
[37b6e78] | 288 | <filename>~/.zshrc</filename> file. If you wish to run these questions
|
---|
| 289 | again, run <command>zsh
|
---|
| 290 | /usr/share/zsh/&zsh-version;/functions/zsh-newuser-install -f</command>.
|
---|
| 291 | </para>
|
---|
| 292 |
|
---|
| 293 | <para>
|
---|
| 294 | There are several built-in advanced prompts. In the
|
---|
| 295 | <command>zsh</command> shell, start advanced prompt support with
|
---|
| 296 | <command>autoload -U promptinit</command>, then
|
---|
| 297 | <command>promptinit</command>. Available prompt names are listed with
|
---|
| 298 | <command>prompt -l</command>. Select a particular one with
|
---|
[f716ef4] | 299 | <command>prompt <literal><prompt-name></literal></command>.
|
---|
| 300 | Display all available
|
---|
[37b6e78] | 301 | prompts with <command>prompt -p</command>. Except for the list and
|
---|
| 302 | display commands above, you can insert the other ones in
|
---|
| 303 | <filename>~/.zshrc</filename> to be automatically executed at
|
---|
| 304 | shell start, with the prompt you chose.
|
---|
| 305 | </para>
|
---|
| 306 |
|
---|
[a6a160b] | 307 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 308 | <primary sortas="e-etc-zsh-zshenv">/etc/zsh/zshenv</primary>
|
---|
[a6a160b] | 309 | </indexterm>
|
---|
| 310 |
|
---|
| 311 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 312 | <primary sortas="e-etc-zsh-zprofile">/etc/zsh/zprofile</primary>
|
---|
[a6a160b] | 313 | </indexterm>
|
---|
| 314 |
|
---|
| 315 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 316 | <primary sortas="e-etc-zsh-zshrc">/etc/zsh/zshrc</primary>
|
---|
[a6a160b] | 317 | </indexterm>
|
---|
| 318 |
|
---|
| 319 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 320 | <primary sortas="e-etc-zsh-zlogin">/etc/zsh/zlogin</primary>
|
---|
[a6a160b] | 321 | </indexterm>
|
---|
| 322 |
|
---|
| 323 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 324 | <primary sortas="e-etc-zsh-zlogout">/etc/zsh/zlogout</primary>
|
---|
[a6a160b] | 325 | </indexterm>
|
---|
| 326 |
|
---|
| 327 | </sect3>
|
---|
| 328 |
|
---|
[5ef8b741] | 329 | <sect3>
|
---|
| 330 | <title>Configuration Information</title>
|
---|
| 331 |
|
---|
[f716ef4] | 332 | <para>
|
---|
| 333 | Update <filename>/etc/shells</filename> to include the
|
---|
| 334 | <application>zsh</application> shell program names (as the
|
---|
| 335 | <systemitem class="username">root</systemitem> user):
|
---|
| 336 | </para>
|
---|
[5ef8b741] | 337 |
|
---|
| 338 | <screen role="root"><userinput>cat >> /etc/shells << "EOF"
|
---|
[e74610e7] | 339 | <literal>/bin/zsh</literal>
|
---|
[5ef8b741] | 340 | EOF</userinput></screen>
|
---|
| 341 |
|
---|
| 342 | </sect3>
|
---|
| 343 |
|
---|
[a6a160b] | 344 | </sect2>
|
---|
| 345 |
|
---|
| 346 | <sect2 role="content">
|
---|
| 347 | <title>Contents</title>
|
---|
| 348 |
|
---|
| 349 | <segmentedlist>
|
---|
[5ef8b741] | 350 | <segtitle>Installed Programs</segtitle>
|
---|
[a6a160b] | 351 | <segtitle>Installed Libraries</segtitle>
|
---|
| 352 | <segtitle>Installed Directories</segtitle>
|
---|
| 353 |
|
---|
| 354 | <seglistitem>
|
---|
[e74610e7] | 355 | <seg>zsh and zsh-&zsh-version; (hardlinked to each other)</seg>
|
---|
[8763a1da] | 356 | <seg>Numerous plugin helper modules under
|
---|
[36e088d] | 357 | /usr/lib/zsh/&zsh-version;/</seg>
|
---|
[8763a1da] | 358 | <seg>/usr/{lib,share}/zsh and /usr/share/doc/zsh-&zsh-version;</seg>
|
---|
[a6a160b] | 359 | </seglistitem>
|
---|
| 360 | </segmentedlist>
|
---|
| 361 |
|
---|
| 362 | <variablelist>
|
---|
| 363 | <bridgehead renderas="sect3">Short Description</bridgehead>
|
---|
| 364 | <?dbfo list-presentation="list"?>
|
---|
| 365 | <?dbhtml list-presentation="table"?>
|
---|
| 366 |
|
---|
| 367 | <varlistentry id="zsh-prog">
|
---|
| 368 | <term><command>zsh</command></term>
|
---|
| 369 | <listitem>
|
---|
[f716ef4] | 370 | <para>
|
---|
| 371 | is a shell which has command-line editing, built-in spelling
|
---|
| 372 | correction, programmable command completion, shell functions (with
|
---|
| 373 | autoloading), a history mechanism, and a host of other features.
|
---|
| 374 | </para>
|
---|
[a6a160b] | 375 | <indexterm zone="zsh zsh-prog">
|
---|
| 376 | <primary sortas="b-zsh">zsh</primary>
|
---|
| 377 | </indexterm>
|
---|
| 378 | </listitem>
|
---|
| 379 | </varlistentry>
|
---|
[1aa3a3ca] | 380 |
|
---|
[a6a160b] | 381 | </variablelist>
|
---|
| 382 |
|
---|
| 383 | </sect2>
|
---|
| 384 |
|
---|
| 385 | </sect1>
|
---|