Add gpgwkd function for gpg key fetches
[zsh.git] / .zsh / zsh-syntax-highlighting / INSTALL.md
1 How to install
2 --------------
3
4 ### Using packages
5
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]
16
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
28
29 See also [repology's cross-distro index](https://repology.org/metapackage/zsh-syntax-highlighting/versions)
30
31
32 ### In your ~/.zshrc
33
34 Simply clone this repository and source the script:
35
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
38
39 Then, enable syntax highlighting in the current interactive shell:
40
41 source ./zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
42
43 If `git` is not installed, download and extract a snapshot of the latest
44 development tree from:
45
46 https://github.com/zsh-users/zsh-syntax-highlighting/archive/master.tar.gz
47
48 Note the `source` command must be **at the end** of `~/.zshrc`.
49
50
51 ### With a plugin manager
52
53 Note that `zsh-syntax-highlighting` must be the last plugin sourced.
54
55 The zsh-syntax-highlighting authors recommend manual installation over the use
56 of a framework or plugin manager.
57
58 This list is incomplete as there are too many
59 [frameworks / plugin managers][framework-list] to list them all here.
60
61 [framework-list]: https://github.com/unixorn/awesome-zsh-plugins#frameworks
62
63 #### [Antigen](https://github.com/zsh-users/antigen)
64
65 Add `antigen bundle zsh-users/zsh-syntax-highlighting` as the last bundle in
66 your `.zshrc`.
67
68 #### [Oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh)
69
70 1. Clone this repository in oh-my-zsh's plugins directory:
71
72 git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
73
74 2. Activate the plugin in `~/.zshrc`:
75
76 plugins=( [plugins...] zsh-syntax-highlighting)
77
78 3. Source `~/.zshrc` to take changes into account:
79
80 source ~/.zshrc
81
82 #### [Prezto](https://github.com/sorin-ionescu/prezto)
83
84 Zsh-syntax-highlighting is included with Prezto. See the
85 [Prezto documentation][prezto-docs] to enable and configure highlighters.
86
87 [prezto-docs]: https://github.com/sorin-ionescu/prezto/tree/master/modules/syntax-highlighting
88
89 #### [zgen](https://github.com/tarjoilija/zgen)
90
91 Add `zgen load zsh-users/zsh-syntax-highlighting` to the end of your `.zshrc`.
92
93 #### [zplug](https://github.com/zplug/zplug)
94
95 Add `zplug "zsh-users/zsh-syntax-highlighting", defer:2` to your `.zshrc`.
96
97 #### [zplugin](https://github.com/psprint/zplugin)
98
99 Add `zplugin load zsh-users/zsh-syntax-highlighting` to the end of your
100 `.zshrc`.
101
102
103 ### System-wide installation
104
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
108
109 make install
110
111 and directing your users to add
112
113 source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
114
115 to their `.zshrc`s.