[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 |
|
---|
[3032882] | 39 | &lfs112_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 |
|
---|
[3597eb6] | 111 | <para condition="html" role="usernotes">User Notes:
|
---|
| 112 | <ulink url="&blfs-wiki;/zsh"/></para>
|
---|
| 113 |
|
---|
[a6a160b] | 114 | </sect2>
|
---|
| 115 |
|
---|
| 116 | <sect2 role="installation">
|
---|
[f17b2db] | 117 | <title>Installation of zsh</title>
|
---|
[a6a160b] | 118 |
|
---|
[f716ef4] | 119 | <para>
|
---|
| 120 | If you downloaded the optional documentation, unpack it with
|
---|
| 121 | the following command:
|
---|
| 122 | </para>
|
---|
[98078a63] | 123 |
|
---|
[8763a1da] | 124 | <screen><userinput>tar --strip-components=1 -xvf ../zsh-&zsh-version;-doc.tar.xz</userinput></screen>
|
---|
[6eff6e1] | 125 |
|
---|
[8f1fc267] | 126 | <!-- <note>
|
---|
[37b6e78] | 127 | <para>
|
---|
| 128 | Using a script to build with "su -c script" may produce a funny
|
---|
| 129 | configure error message: "no controlling tty". If this happens, add
|
---|
[8f1fc267] | 130 | the switch -\-with-tcsetpgrp to configure.
|
---|
[37b6e78] | 131 | </para>
|
---|
| 132 | </note>
|
---|
[8f1fc267] | 133 | -->
|
---|
[f716ef4] | 134 | <para>
|
---|
| 135 | Install <application>zsh</application> by running the following
|
---|
| 136 | commands:
|
---|
| 137 | </para>
|
---|
[a6a160b] | 138 |
|
---|
[4f4e7f18] | 139 | <screen><userinput>./configure --prefix=/usr \
|
---|
| 140 | --sysconfdir=/etc/zsh \
|
---|
| 141 | --enable-etcdir=/etc/zsh \
|
---|
| 142 | --enable-cap \
|
---|
| 143 | --enable-gdbm &&
|
---|
[ca17955] | 144 | make &&
|
---|
[a6a160b] | 145 |
|
---|
[0cf6826a] | 146 | makeinfo Doc/zsh.texi --plaintext -o Doc/zsh.txt &&
|
---|
[ca17955] | 147 | makeinfo Doc/zsh.texi --html -o Doc/html &&
|
---|
[0cf6826a] | 148 | makeinfo Doc/zsh.texi --html --no-split --no-headers -o Doc/zsh.html</userinput></screen>
|
---|
[6eff6e1] | 149 |
|
---|
[f716ef4] | 150 | <para>
|
---|
| 151 | If you have <xref linkend="texlive"/>
|
---|
| 152 | installed, you can build PDF format of the documentation by issuing
|
---|
| 153 | the following command:
|
---|
| 154 | </para>
|
---|
[f1e103a] | 155 |
|
---|
[06908bf6] | 156 | <screen remap="doc"><userinput>texi2pdf Doc/zsh.texi -o Doc/zsh.pdf</userinput></screen>
|
---|
[f1e103a] | 157 |
|
---|
[f716ef4] | 158 | <para>
|
---|
| 159 | To test the results, issue: <command>make check</command>.
|
---|
| 160 | </para>
|
---|
[5ef8b741] | 161 |
|
---|
[f716ef4] | 162 | <para>
|
---|
| 163 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 164 | </para>
|
---|
[a6a160b] | 165 |
|
---|
[0cf6826a] | 166 | <screen role="root"><userinput>make install &&
|
---|
| 167 | make infodir=/usr/share/info install.info &&
|
---|
[f1e103a] | 168 |
|
---|
[0cf6826a] | 169 | install -v -m755 -d /usr/share/doc/zsh-&zsh-version;/html &&
|
---|
| 170 | install -v -m644 Doc/html/* /usr/share/doc/zsh-&zsh-version;/html &&
|
---|
| 171 | install -v -m644 Doc/zsh.{html,txt} /usr/share/doc/zsh-&zsh-version;</userinput></screen>
|
---|
[6eff6e1] | 172 |
|
---|
[f716ef4] | 173 | <para>
|
---|
| 174 | If you downloaded the optional documentation, install it by issuing
|
---|
| 175 | the following commands as the
|
---|
| 176 | <systemitem class="username">root</systemitem> user:
|
---|
| 177 | </para>
|
---|
[6eff6e1] | 178 |
|
---|
| 179 | <screen role="root"><userinput>make htmldir=/usr/share/doc/zsh-&zsh-version;/html install.html &&
|
---|
[fcf4b970] | 180 | install -v -m644 Doc/zsh.dvi /usr/share/doc/zsh-&zsh-version;</userinput></screen>
|
---|
[6eff6e1] | 181 |
|
---|
[f716ef4] | 182 | <para>
|
---|
| 183 | If you built the PDF format of the documentation, install
|
---|
| 184 | it by issuing the following command as the
|
---|
| 185 | <systemitem class="username">root</systemitem> user:
|
---|
| 186 | </para>
|
---|
[6eff6e1] | 187 |
|
---|
[06908bf6] | 188 | <screen role="root"
|
---|
| 189 | remap="doc"><userinput>install -v -m644 Doc/zsh.pdf /usr/share/doc/zsh-&zsh-version;</userinput></screen>
|
---|
[6eff6e1] | 190 |
|
---|
| 191 | </sect2>
|
---|
| 192 |
|
---|
| 193 | <sect2 role="commands">
|
---|
| 194 | <title>Command Explanations</title>
|
---|
[29f80ebc] | 195 |
|
---|
[f716ef4] | 196 | <para>
|
---|
| 197 | <parameter>--sysconfdir=/etc/zsh</parameter> and
|
---|
| 198 | <parameter>--enable-etcdir=/etc/zsh</parameter>: These parameters are
|
---|
| 199 | used so that all the <application>zsh</application> configuration files
|
---|
| 200 | are consolidated into the <filename class='directory'>/etc/zsh</filename>
|
---|
| 201 | directory. Omit these parameters if you wish to retain historical
|
---|
| 202 | compatibility by having all the files located in the
|
---|
| 203 | <filename class='directory'>/etc</filename> directory.
|
---|
| 204 | </para>
|
---|
[fd7e0ed6] | 205 |
|
---|
[f716ef4] | 206 | <para>
|
---|
[4f4e7f18] | 207 | <parameter>--enable-cap</parameter>: This option enables
|
---|
[f716ef4] | 208 | POSIX capabilities.
|
---|
| 209 | </para>
|
---|
[fcf4b970] | 210 |
|
---|
[f716ef4] | 211 | <para>
|
---|
[4f4e7f18] | 212 | <parameter>--enable-gdbm</parameter>: This option enables the
|
---|
[f716ef4] | 213 | use of the <application>GDBM</application> library.
|
---|
| 214 | </para>
|
---|
[caa0c15] | 215 |
|
---|
[f716ef4] | 216 | <para>
|
---|
| 217 | <option>--enable-pcre</option>: This option allows zsh to use
|
---|
| 218 | the <application>PCRE</application> regular expression library in shell
|
---|
| 219 | builtins.
|
---|
| 220 | </para>
|
---|
[a6a160b] | 221 | </sect2>
|
---|
| 222 |
|
---|
| 223 | <sect2 role="configuration">
|
---|
[f17b2db] | 224 | <title>Configuring zsh</title>
|
---|
[a6a160b] | 225 |
|
---|
| 226 | <sect3 id="zsh-config">
|
---|
| 227 | <title>Config Files</title>
|
---|
| 228 |
|
---|
[f716ef4] | 229 | <para>
|
---|
| 230 | There are a whole host of configuration files for
|
---|
| 231 | <application>zsh</application> including
|
---|
| 232 | <filename>/etc/zsh/zshenv</filename>,
|
---|
| 233 | <filename>/etc/zsh/zprofile</filename>,
|
---|
| 234 | <filename>/etc/zsh/zshrc</filename>,
|
---|
| 235 | <filename>/etc/zsh/zlogin</filename> and
|
---|
| 236 | <filename>/etc/zsh/zlogout</filename>.
|
---|
| 237 | You can find more information on these in the
|
---|
| 238 | <filename>zsh(1)</filename> and related manual pages.
|
---|
| 239 | </para>
|
---|
[a6a160b] | 240 |
|
---|
[37b6e78] | 241 | <para>
|
---|
| 242 | The first time zsh is executed, you will be prompted by messages asking
|
---|
[8763a1da] | 243 | several questions. The answers will be used to create a
|
---|
[37b6e78] | 244 | <filename>~/.zshrc</filename> file. If you wish to run these questions
|
---|
| 245 | again, run <command>zsh
|
---|
| 246 | /usr/share/zsh/&zsh-version;/functions/zsh-newuser-install -f</command>.
|
---|
| 247 | </para>
|
---|
| 248 |
|
---|
| 249 | <para>
|
---|
| 250 | There are several built-in advanced prompts. In the
|
---|
| 251 | <command>zsh</command> shell, start advanced prompt support with
|
---|
| 252 | <command>autoload -U promptinit</command>, then
|
---|
| 253 | <command>promptinit</command>. Available prompt names are listed with
|
---|
| 254 | <command>prompt -l</command>. Select a particular one with
|
---|
[f716ef4] | 255 | <command>prompt <literal><prompt-name></literal></command>.
|
---|
| 256 | Display all available
|
---|
[37b6e78] | 257 | prompts with <command>prompt -p</command>. Except for the list and
|
---|
| 258 | display commands above, you can insert the other ones in
|
---|
| 259 | <filename>~/.zshrc</filename> to be automatically executed at
|
---|
| 260 | shell start, with the prompt you chose.
|
---|
| 261 | </para>
|
---|
| 262 |
|
---|
[a6a160b] | 263 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 264 | <primary sortas="e-etc-zsh-zshenv">/etc/zsh/zshenv</primary>
|
---|
[a6a160b] | 265 | </indexterm>
|
---|
| 266 |
|
---|
| 267 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 268 | <primary sortas="e-etc-zsh-zprofile">/etc/zsh/zprofile</primary>
|
---|
[a6a160b] | 269 | </indexterm>
|
---|
| 270 |
|
---|
| 271 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 272 | <primary sortas="e-etc-zsh-zshrc">/etc/zsh/zshrc</primary>
|
---|
[a6a160b] | 273 | </indexterm>
|
---|
| 274 |
|
---|
| 275 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 276 | <primary sortas="e-etc-zsh-zlogin">/etc/zsh/zlogin</primary>
|
---|
[a6a160b] | 277 | </indexterm>
|
---|
| 278 |
|
---|
| 279 | <indexterm zone="zsh zsh-config">
|
---|
[6eff6e1] | 280 | <primary sortas="e-etc-zsh-zlogout">/etc/zsh/zlogout</primary>
|
---|
[a6a160b] | 281 | </indexterm>
|
---|
| 282 |
|
---|
| 283 | </sect3>
|
---|
| 284 |
|
---|
[5ef8b741] | 285 | <sect3>
|
---|
| 286 | <title>Configuration Information</title>
|
---|
| 287 |
|
---|
[f716ef4] | 288 | <para>
|
---|
| 289 | Update <filename>/etc/shells</filename> to include the
|
---|
| 290 | <application>zsh</application> shell program names (as the
|
---|
| 291 | <systemitem class="username">root</systemitem> user):
|
---|
| 292 | </para>
|
---|
[5ef8b741] | 293 |
|
---|
| 294 | <screen role="root"><userinput>cat >> /etc/shells << "EOF"
|
---|
[e74610e7] | 295 | <literal>/bin/zsh</literal>
|
---|
[5ef8b741] | 296 | EOF</userinput></screen>
|
---|
| 297 |
|
---|
| 298 | </sect3>
|
---|
| 299 |
|
---|
[a6a160b] | 300 | </sect2>
|
---|
| 301 |
|
---|
| 302 | <sect2 role="content">
|
---|
| 303 | <title>Contents</title>
|
---|
| 304 |
|
---|
| 305 | <segmentedlist>
|
---|
[5ef8b741] | 306 | <segtitle>Installed Programs</segtitle>
|
---|
[a6a160b] | 307 | <segtitle>Installed Libraries</segtitle>
|
---|
| 308 | <segtitle>Installed Directories</segtitle>
|
---|
| 309 |
|
---|
| 310 | <seglistitem>
|
---|
[e74610e7] | 311 | <seg>zsh and zsh-&zsh-version; (hardlinked to each other)</seg>
|
---|
[8763a1da] | 312 | <seg>Numerous plugin helper modules under
|
---|
[36e088d] | 313 | /usr/lib/zsh/&zsh-version;/</seg>
|
---|
[8763a1da] | 314 | <seg>/usr/{lib,share}/zsh and /usr/share/doc/zsh-&zsh-version;</seg>
|
---|
[a6a160b] | 315 | </seglistitem>
|
---|
| 316 | </segmentedlist>
|
---|
| 317 |
|
---|
| 318 | <variablelist>
|
---|
| 319 | <bridgehead renderas="sect3">Short Description</bridgehead>
|
---|
| 320 | <?dbfo list-presentation="list"?>
|
---|
| 321 | <?dbhtml list-presentation="table"?>
|
---|
| 322 |
|
---|
| 323 | <varlistentry id="zsh-prog">
|
---|
| 324 | <term><command>zsh</command></term>
|
---|
| 325 | <listitem>
|
---|
[f716ef4] | 326 | <para>
|
---|
| 327 | is a shell which has command-line editing, built-in spelling
|
---|
| 328 | correction, programmable command completion, shell functions (with
|
---|
[4c24eb0a] | 329 | autoloading), a history mechanism, and a host of other features
|
---|
[f716ef4] | 330 | </para>
|
---|
[a6a160b] | 331 | <indexterm zone="zsh zsh-prog">
|
---|
| 332 | <primary sortas="b-zsh">zsh</primary>
|
---|
| 333 | </indexterm>
|
---|
| 334 | </listitem>
|
---|
| 335 | </varlistentry>
|
---|
[1aa3a3ca] | 336 |
|
---|
[a6a160b] | 337 | </variablelist>
|
---|
| 338 |
|
---|
| 339 | </sect2>
|
---|
| 340 |
|
---|
| 341 | </sect1>
|
---|