6 * Arch Linux: [community/zsh-syntax-highlighting][arch-package] / [AUR/zsh-syntax-highlighting-git][AUR-package]
7 * Debian: `zsh-syntax-highlighting` package [in `stretch`][debian-package] (or in [OBS repository][obs-repository])
8 * Fedora: [zsh-syntax-highlighting package][fedora-package-alt] in Fedora 24+ (or in [OBS repository][obs-repository])
9 * FreeBSD: `pkg install zsh-syntax-highlighting` (port name: [`textproc/zsh-syntax-highlighting`][freebsd-port])
10 * Gentoo: [mv overlay][gentoo-overlay]
11 * Mac OS X / Homebrew: [brew install zsh-syntax-highlighting][brew-package]
12 * Ubuntu: `zsh-syntax-highlighting` package [in Xenial][ubuntu-package] (or in [OBS repository][obs-repository])
13 * RHEL / CentOS / Scientific Linux: `zsh-syntax-highlighting` package in [OBS repository][obs-repository]
14 * openSUSE / SLE: `zsh-syntax-highlighting` package in [OBS repository][obs-repository]
15 * Void Linux: `zsh-syntax-highlighting package` [in XBPS][void-package]
17 [arch-package]: https://www.archlinux.org/packages/zsh-syntax-highlighting
18 [AUR-package]: https://aur.archlinux.org/packages/zsh-syntax-highlighting-git
19 [debian-package]: https://packages.debian.org/zsh-syntax-highlighting
20 [freebsd-port]: http://www.freshports.org/textproc/zsh-syntax-highlighting/
21 [gentoo-overlay]: http://gpo.zugaina.org/app-shells/zsh-syntax-highlighting
22 [brew-package]: https://github.com/Homebrew/homebrew-core/blob/master/Formula/zsh-syntax-highlighting.rb
23 [ubuntu-package]: https://launchpad.net/ubuntu/+source/zsh-syntax-highlighting
24 [fedora-package]: https://apps.fedoraproject.org/packages/zsh-syntax-highlighting
25 [fedora-package-alt]: https://bodhi.fedoraproject.org/updates/?packages=zsh-syntax-highlighting
26 [obs-repository]: https://software.opensuse.org//download.html?project=shells%3Azsh-users%3Azsh-syntax-highlighting&package=zsh-syntax-highlighting
27 [void-package]: https://github.com/voidlinux/void-packages/tree/master/srcpkgs/zsh-syntax-highlighting
29 See also [repology's cross-distro index](https://repology.org/metapackage/zsh-syntax-highlighting/versions)
34 Simply clone this repository and source the script:
36 git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
37 echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
39 Then, enable syntax highlighting in the current interactive shell:
41 source ./zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
43 If `git` is not installed, download and extract a snapshot of the latest
44 development tree from:
46 https://github.com/zsh-users/zsh-syntax-highlighting/archive/master.tar.gz
48 Note the `source` command must be **at the end** of `~/.zshrc`.
51 ### With a plugin manager
53 Note that `zsh-syntax-highlighting` must be the last plugin sourced.
55 The zsh-syntax-highlighting authors recommend manual installation over the use
56 of a framework or plugin manager.
58 This list is incomplete as there are too many
59 [frameworks / plugin managers][framework-list] to list them all here.
61 [framework-list]: https://github.com/unixorn/awesome-zsh-plugins#frameworks
63 #### [Antigen](https://github.com/zsh-users/antigen)
65 Add `antigen bundle zsh-users/zsh-syntax-highlighting` as the last bundle in
68 #### [Oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh)
70 1. Clone this repository in oh-my-zsh's plugins directory:
72 git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
74 2. Activate the plugin in `~/.zshrc`:
76 plugins=( [plugins...] zsh-syntax-highlighting)
78 3. Source `~/.zshrc` to take changes into account:
82 #### [Prezto](https://github.com/sorin-ionescu/prezto)
84 Zsh-syntax-highlighting is included with Prezto. See the
85 [Prezto documentation][prezto-docs] to enable and configure highlighters.
87 [prezto-docs]: https://github.com/sorin-ionescu/prezto/tree/master/modules/syntax-highlighting
89 #### [zgen](https://github.com/tarjoilija/zgen)
91 Add `zgen load zsh-users/zsh-syntax-highlighting` to the end of your `.zshrc`.
93 #### [zplug](https://github.com/zplug/zplug)
95 Add `zplug "zsh-users/zsh-syntax-highlighting", defer:2` to your `.zshrc`.
97 #### [zplugin](https://github.com/psprint/zplugin)
99 Add `zplugin load zsh-users/zsh-syntax-highlighting` to the end of your
103 ### System-wide installation
105 Any of the above methods is suitable for a single-user installation,
106 which requires no special privileges. If, however, you desire to install
107 zsh-syntax-highlighting system-wide, you may do so by running
111 and directing your users to add
113 source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh