[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 |
|
---|
[c6b192c] | 7 | <!ENTITY zsh-download-http "https://www.zsh.org/pub/zsh-&zsh-version;.tar.xz">
|
---|
[8070ffce] | 8 | <!ENTITY zsh-download-ftp " ">
|
---|
[06333e6] | 9 | <!ENTITY zsh-md5sum "182e37ca3fe3fa6a44f69ad462c5c30e">
|
---|
| 10 | <!ENTITY zsh-size "3.2 MB">
|
---|
| 11 | <!ENTITY zsh-buildsize "48 MB (includes documentation and tests)">
|
---|
| 12 | <!ENTITY zsh-time "1.6 SBU (Using parallelism=4; includes documentation and tests)">
|
---|
[6eff6e1] | 13 |
|
---|
[06333e6] | 14 | <!ENTITY zsh-doc-md5sum "8db53446f613521fb4f9b0bd9f6adda1">
|
---|
[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 |
|
---|
[f17b2db] | 22 | <title>zsh-&zsh-version;</title>
|
---|
[a6a160b] | 23 |
|
---|
| 24 | <indexterm zone="zsh">
|
---|
[f17b2db] | 25 | <primary sortas="a-zsh">zsh</primary>
|
---|
[a6a160b] | 26 | </indexterm>
|
---|
| 27 |
|
---|
| 28 | <sect2 role="package">
|
---|
[f17b2db] | 29 | <title>Introduction to zsh</title>
|
---|
[a6a160b] | 30 |
|
---|
[f716ef4] | 31 | <para>
|
---|
| 32 | The <application>zsh</application> package contains a command
|
---|
| 33 | interpreter (shell) usable as an interactive login shell and as
|
---|
| 34 | a shell script command processor. Of the standard shells,
|
---|
| 35 | <application>zsh</application> most closely resembles
|
---|
| 36 | <application>ksh</application> but includes many enhancements.
|
---|
| 37 | </para>
|
---|
[a6a160b] | 38 |
|
---|
[fbd04125] | 39 | &lfs120_checked;
|
---|
[6eff6e1] | 40 |
|
---|
[a6a160b] | 41 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 42 | <itemizedlist spacing="compact">
|
---|
| 43 | <listitem>
|
---|
[f716ef4] | 44 | <para>
|
---|
| 45 | Download (HTTP): <ulink url="&zsh-download-http;"/>
|
---|
| 46 | </para>
|
---|
[a6a160b] | 47 | </listitem>
|
---|
| 48 | <listitem>
|
---|
[f716ef4] | 49 | <para>
|
---|
| 50 | Download (FTP): <ulink url="&zsh-download-ftp;"/>
|
---|
| 51 | </para>
|
---|
[a6a160b] | 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
[f716ef4] | 54 | <para>
|
---|
| 55 | Download MD5 sum: &zsh-md5sum;
|
---|
| 56 | </para>
|
---|
[a6a160b] | 57 | </listitem>
|
---|
| 58 | <listitem>
|
---|
[f716ef4] | 59 | <para>
|
---|
| 60 | Download size: &zsh-size;
|
---|
| 61 | </para>
|
---|
[a6a160b] | 62 | </listitem>
|
---|
| 63 | <listitem>
|
---|
[f716ef4] | 64 | <para>
|
---|
| 65 | Estimated disk space required: &zsh-buildsize;
|
---|
| 66 | </para>
|
---|
[a6a160b] | 67 | </listitem>
|
---|
| 68 | <listitem>
|
---|
[f716ef4] | 69 | <para>
|
---|
| 70 | Estimated build time: &zsh-time;
|
---|
| 71 | </para>
|
---|
[a6a160b] | 72 | </listitem>
|
---|
| 73 | </itemizedlist>
|
---|
| 74 |
|
---|
[6eff6e1] | 75 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
[29f80ebc] | 76 | <itemizedlist spacing="compact">
|
---|
| 77 | <listitem>
|
---|
[f716ef4] | 78 | <para>
|
---|
| 79 | Optional Documentation: <ulink
|
---|
[c6b192c] | 80 | url="https://www.zsh.org/pub/zsh-&zsh-version;-doc.tar.xz"/>
|
---|
[f716ef4] | 81 | </para>
|
---|
[6eff6e1] | 82 | </listitem>
|
---|
[29f80ebc] | 83 | <listitem>
|
---|
[f716ef4] | 84 | <para>
|
---|
| 85 | Documentation MD5 sum: &zsh-doc-md5sum;
|
---|
| 86 | </para>
|
---|
[6eff6e1] | 87 | </listitem>
|
---|
[37b6e78] | 88 | <listitem>
|
---|
[f716ef4] | 89 | <para>
|
---|
| 90 | Documentation download size: &zsh-doc-size;
|
---|
| 91 | </para>
|
---|
[37b6e78] | 92 | </listitem>
|
---|
[6eff6e1] | 93 | </itemizedlist>
|
---|
| 94 |
|
---|
[1590eb9] | 95 | <note>
|
---|
| 96 | <para>
|
---|
| 97 | When there is a new <application>zsh</application> release, the old
|
---|
| 98 | files shown above are moved to a new server directory:
|
---|
[c6b192c] | 99 | <ulink url="https://www.zsh.org/pub/old/"/>.
|
---|
[1590eb9] | 100 | </para>
|
---|
| 101 | </note>
|
---|
| 102 |
|
---|
[f17b2db] | 103 | <bridgehead renderas="sect3">zsh Dependencies</bridgehead>
|
---|
[a6a160b] | 104 |
|
---|
| 105 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[ca17955] | 106 | <para role="optional">
|
---|
[4f4e7f18] | 107 | <xref linkend="pcre"/> and
|
---|
[36357196] | 108 | <xref linkend="valgrind"/>
|
---|
[fcf4b970] | 109 | </para>
|
---|
[a6a160b] | 110 |
|
---|
| 111 | </sect2>
|
---|
| 112 |
|
---|
| 113 | <sect2 role="installation">
|
---|
[f17b2db] | 114 | <title>Installation of zsh</title>
|
---|
[a6a160b] | 115 |
|
---|
[f716ef4] | 116 | <para>
|
---|
| 117 | If you downloaded the optional documentation, unpack it with
|
---|
| 118 | the following command:
|
---|
| 119 | </para>
|
---|
[98078a63] | 120 |
|
---|
[8763a1da] | 121 | <screen><userinput>tar --strip-components=1 -xvf ../zsh-&zsh-version;-doc.tar.xz</userinput></screen>
|
---|
[6eff6e1] | 122 |
|
---|
[8f1fc267] | 123 | <!-- <note>
|
---|
[37b6e78] | 124 | <para>
|
---|
| 125 | Using a script to build with "su -c script" may produce a funny
|
---|
| 126 | configure error message: "no controlling tty". If this happens, add
|
---|
[8f1fc267] | 127 | the switch -\-with-tcsetpgrp to configure.
|
---|
[37b6e78] | 128 | </para>
|
---|
| 129 | </note>
|
---|
[8f1fc267] | 130 | -->
|
---|
[f716ef4] | 131 | <para>
|
---|
| 132 | Install <application>zsh</application> by running the following
|
---|
| 133 | commands:
|
---|
| 134 | </para>
|
---|
[a6a160b] | 135 |
|
---|
[4f4e7f18] | 136 | <screen><userinput>./configure --prefix=/usr \
|
---|
| 137 | --sysconfdir=/etc/zsh \
|
---|
| 138 | --enable-etcdir=/etc/zsh \
|
---|
| 139 | --enable-cap \
|
---|
| 140 | --enable-gdbm &&
|
---|
[ca17955] | 141 | make &&
|
---|
[a6a160b] | 142 |
|
---|
[0cf6826a] | 143 | makeinfo Doc/zsh.texi --plaintext -o Doc/zsh.txt &&
|
---|
[ca17955] | 144 | makeinfo Doc/zsh.texi --html -o Doc/html &&
|
---|
[0cf6826a] | 145 | makeinfo Doc/zsh.texi --html --no-split --no-headers -o Doc/zsh.html</userinput></screen>
|
---|
[6eff6e1] | 146 |
|
---|
[f716ef4] | 147 | <para>
|
---|
| 148 | If you have <xref linkend="texlive"/>
|
---|
| 149 | installed, you can build PDF format of the documentation by issuing
|
---|
| 150 | the following command:
|
---|
| 151 | </para>
|
---|
[f1e103a] | 152 |
|
---|
[06908bf6] | 153 | <screen remap="doc"><userinput>texi2pdf Doc/zsh.texi -o Doc/zsh.pdf</userinput></screen>
|
---|
[f1e103a] | 154 |
|
---|
[f716ef4] | 155 | <para>
|
---|
| 156 | To test the results, issue: <command>make check</command>.
|
---|
| 157 | </para>
|
---|
[5ef8b741] | 158 |
|
---|
[f716ef4] | 159 | <para>
|
---|
| 160 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 161 | </para>
|
---|
[a6a160b] | 162 |
|
---|
[0cf6826a] | 163 | <screen role="root"><userinput>make install &&
|
---|
| 164 | make infodir=/usr/share/info install.info &&
|
---|
[f1e103a] | 165 |
|
---|
[0cf6826a] | 166 | install -v -m755 -d /usr/share/doc/zsh-&zsh-version;/html &&
|
---|
| 167 | install -v -m644 Doc/html/* /usr/share/doc/zsh-&zsh-version;/html &&
|
---|
| 168 | install -v -m644 Doc/zsh.{html,txt} /usr/share/doc/zsh-&zsh-version;</userinput></screen>
|
---|
[6eff6e1] | 169 |
|
---|
[f716ef4] | 170 | <para>
|
---|
| 171 | If you downloaded the optional documentation, install it by issuing
|
---|
| 172 | the following commands as the
|
---|
| 173 | <systemitem class="username">root</systemitem> user:
|
---|
| 174 | </para>
|
---|
[6eff6e1] | 175 |
|
---|
| 176 | <screen role="root"><userinput>make htmldir=/usr/share/doc/zsh-&zsh-version;/html install.html &&
|
---|
[fcf4b970] | 177 | install -v -m644 Doc/zsh.dvi /usr/share/doc/zsh-&zsh-version;</userinput></screen>
|
---|
[6eff6e1] | 178 |
|
---|
[f716ef4] | 179 | <para>
|
---|
| 180 | If you built the PDF format of the documentation, install
|
---|
| 181 | it by issuing the following command as the
|
---|
| 182 | <systemitem class="username">root</systemitem> user:
|
---|
| 183 | </para>
|
---|
[6eff6e1] | 184 |
|
---|
[06908bf6] | 185 | <screen role="root"
|
---|
| 186 | remap="doc"><userinput>install -v -m644 Doc/zsh.pdf /usr/share/doc/zsh-&zsh-version;</userinput></screen>
|
---|
[6eff6e1] | 187 |
|
---|
| 188 | </sect2>
|
---|
| 189 |
|
---|
| 190 | <sect2 role="commands">
|
---|
| 191 | <title>Command Explanations</title>
|
---|
[29f80ebc] | 192 |
|
---|
[f716ef4] | 193 | <para>
|
---|
| 194 | <parameter>--sysconfdir=/etc/zsh</parameter> and
|
---|
| 195 | <parameter>--enable-etcdir=/etc/zsh</parameter>: These parameters are
|
---|
| 196 | used so that all the <application>zsh</application> configuration files
|
---|
| 197 | are consolidated into the <filename class='directory'>/etc/zsh</filename>
|
---|
| 198 | directory. Omit these parameters if you wish to retain historical
|
---|
| 199 | compatibility by having all the files located in the
|
---|
| 200 | <filename class='directory'>/etc</filename> directory.
|
---|
| 201 | </para>
|
---|
[fd7e0ed6] | 202 |
|
---|
[f716ef4] | 203 | <para>
|
---|
[4f4e7f18] | 204 | <parameter>--enable-cap</parameter>: This option enables
|
---|
[f716ef4] | 205 | POSIX capabilities.
|
---|
| 206 | </para>
|
---|
[fcf4b970] | 207 |
|
---|
[f716ef4] | 208 | <para>
|
---|
[4f4e7f18] | 209 | <parameter>--enable-gdbm</parameter>: This option enables the
|
---|
[f716ef4] | 210 | use of the <application>GDBM</application> library.
|
---|
| 211 | </para>
|
---|
[caa0c15] | 212 |
|
---|
[f716ef4] | 213 | <para>
|
---|
| 214 | <option>--enable-pcre</option>: This option allows zsh to use
|
---|
| 215 | the <application>PCRE</application> regular expression library in shell
|
---|
| 216 | builtins.
|
---|
| 217 | </para>
|
---|
[a6a160b] | 218 | </sect2>
|
---|
| 219 |
|
---|
| 220 | <sect2 role="configuration">
|
---|
[f17b2db] | 221 | <title>Configuring zsh</title>
|
---|
[a6a160b] | 222 |
|
---|
| 223 | <sect3 id="zsh-config">
|
---|
| 224 | <title>Config Files</title>
|
---|
| 225 |
|
---|
[f716ef4] | 226 | <para>
|
---|
| 227 | There are a whole host of configuration files for
|
---|
| 228 | <application>zsh</application> including
|
---|
| 229 | <filename>/etc/zsh/zshenv</filename>,
|
---|
| 230 | <filename>/etc/zsh/zprofile</filename>,
|
---|
| 231 | <filename>/etc/zsh/zshrc</filename>,
|
---|
| 232 | <filename>/etc/zsh/zlogin</filename> and
|
---|
| 233 | <filename>/etc/zsh/zlogout</filename>.
|
---|
| 234 | You can find more information on these in the
|
---|
| 235 | <filename>zsh(1)</filename> and related manual pages.
|
---|
| 236 | </para>
|
---|
[a6a160b] | 237 |
|
---|
[37b6e78] | 238 | <para>
|
---|
| 239 | The first time zsh is executed, you will be prompted by messages asking
|
---|
[8763a1da] | 240 | several questions. The answers will be used to create a
|
---|
[37b6e78] | 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
|
---|
[f716ef4] | 252 | <command>prompt <literal><prompt-name></literal></command>.
|
---|
| 253 | Display all available
|
---|
[37b6e78] | 254 | prompts with <command>prompt -p</command>. Except for the list and
|
---|
| 255 | display commands above, you can insert the other ones in
|
---|
| 256 | <filename>~/.zshrc</filename> to be automatically executed at
|
---|
| 257 | shell start, with the prompt you chose.
|
---|
| 258 | </para>
|
---|
| 259 |
|
---|
[a6a160b] | 260 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 261 | <primary sortas="e-etc-zsh-zshenv">/etc/zsh/zshenv</primary>
|
---|
[a6a160b] | 262 | </indexterm>
|
---|
| 263 |
|
---|
| 264 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 265 | <primary sortas="e-etc-zsh-zprofile">/etc/zsh/zprofile</primary>
|
---|
[a6a160b] | 266 | </indexterm>
|
---|
| 267 |
|
---|
| 268 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 269 | <primary sortas="e-etc-zsh-zshrc">/etc/zsh/zshrc</primary>
|
---|
[a6a160b] | 270 | </indexterm>
|
---|
| 271 |
|
---|
| 272 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 273 | <primary sortas="e-etc-zsh-zlogin">/etc/zsh/zlogin</primary>
|
---|
[a6a160b] | 274 | </indexterm>
|
---|
| 275 |
|
---|
| 276 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 277 | <primary sortas="e-etc-zsh-zlogout">/etc/zsh/zlogout</primary>
|
---|
[a6a160b] | 278 | </indexterm>
|
---|
| 279 |
|
---|
| 280 | </sect3>
|
---|
| 281 |
|
---|
[5ef8b741] | 282 | <sect3>
|
---|
| 283 | <title>Configuration Information</title>
|
---|
| 284 |
|
---|
[f716ef4] | 285 | <para>
|
---|
| 286 | Update <filename>/etc/shells</filename> to include the
|
---|
| 287 | <application>zsh</application> shell program names (as the
|
---|
| 288 | <systemitem class="username">root</systemitem> user):
|
---|
| 289 | </para>
|
---|
[5ef8b741] | 290 |
|
---|
| 291 | <screen role="root"><userinput>cat >> /etc/shells << "EOF"
|
---|
[e74610e7] | 292 | <literal>/bin/zsh</literal>
|
---|
[5ef8b741] | 293 | EOF</userinput></screen>
|
---|
| 294 |
|
---|
| 295 | </sect3>
|
---|
| 296 |
|
---|
[a6a160b] | 297 | </sect2>
|
---|
| 298 |
|
---|
| 299 | <sect2 role="content">
|
---|
| 300 | <title>Contents</title>
|
---|
| 301 |
|
---|
| 302 | <segmentedlist>
|
---|
[5ef8b741] | 303 | <segtitle>Installed Programs</segtitle>
|
---|
[a6a160b] | 304 | <segtitle>Installed Libraries</segtitle>
|
---|
| 305 | <segtitle>Installed Directories</segtitle>
|
---|
| 306 |
|
---|
| 307 | <seglistitem>
|
---|
[e74610e7] | 308 | <seg>zsh and zsh-&zsh-version; (hardlinked to each other)</seg>
|
---|
[8763a1da] | 309 | <seg>Numerous plugin helper modules under
|
---|
[36e088d] | 310 | /usr/lib/zsh/&zsh-version;/</seg>
|
---|
[8763a1da] | 311 | <seg>/usr/{lib,share}/zsh and /usr/share/doc/zsh-&zsh-version;</seg>
|
---|
[a6a160b] | 312 | </seglistitem>
|
---|
| 313 | </segmentedlist>
|
---|
| 314 |
|
---|
| 315 | <variablelist>
|
---|
| 316 | <bridgehead renderas="sect3">Short Description</bridgehead>
|
---|
| 317 | <?dbfo list-presentation="list"?>
|
---|
| 318 | <?dbhtml list-presentation="table"?>
|
---|
| 319 |
|
---|
| 320 | <varlistentry id="zsh-prog">
|
---|
| 321 | <term><command>zsh</command></term>
|
---|
| 322 | <listitem>
|
---|
[f716ef4] | 323 | <para>
|
---|
| 324 | is a shell which has command-line editing, built-in spelling
|
---|
| 325 | correction, programmable command completion, shell functions (with
|
---|
[4c24eb0a] | 326 | autoloading), a history mechanism, and a host of other features
|
---|
[f716ef4] | 327 | </para>
|
---|
[a6a160b] | 328 | <indexterm zone="zsh zsh-prog">
|
---|
| 329 | <primary sortas="b-zsh">zsh</primary>
|
---|
| 330 | </indexterm>
|
---|
| 331 | </listitem>
|
---|
| 332 | </varlistentry>
|
---|
[1aa3a3ca] | 333 |
|
---|
[a6a160b] | 334 | </variablelist>
|
---|
| 335 |
|
---|
| 336 | </sect2>
|
---|
| 337 |
|
---|
| 338 | </sect1>
|
---|