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