Skip to content

Commit 6507190

Browse files
Mario-paulphy1729
authored andcommitted
docs: add instructions to source .zshrc file after package install
1 parent 143b25e commit 6507190

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

INSTALL.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ How to install
33

44
### Using packages
55

6+
First, install the package:
7+
68
* Arch Linux: [community/zsh-syntax-highlighting][arch-package] / [AUR/zsh-syntax-highlighting-git][AUR-package]
79
* Debian: `zsh-syntax-highlighting` package [in `stretch`][debian-package] (or in [OBS repository][obs-repository])
810
* Fedora: [zsh-syntax-highlighting package][fedora-package-alt] in Fedora 24+ (or in [OBS repository][obs-repository])
@@ -32,6 +34,36 @@ How to install
3234

3335
See also [repology's cross-distro index](https://repology.org/metapackage/zsh-syntax-highlighting/versions)
3436

37+
Second, enable zsh-syntax-highlighting by sourcing the script. Running this command on the terminal will add the source line to the end of your .zshrc:
38+
39+
* On most Linux distributions (except perhaps NixOS):
40+
41+
```zsh
42+
echo "source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
43+
```
44+
45+
* NetBSD and OpenBSD:
46+
47+
```zsh
48+
echo "source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
49+
```
50+
51+
* Mac OS X / Homebrew:
52+
53+
```zsh
54+
echo "source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
55+
```
56+
57+
Then restart zsh (such as by opening a new instance of your terminal emulator).
58+
59+
Alternatively, add the `source` command manually **at the end** of your `.zshrc`:
60+
61+
* On most Linux distributions (except perhaps NixOS):
62+
`source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh`
63+
* NetBSD and OpenBSD:
64+
`source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh`
65+
66+
Then restart zsh.
3567

3668
### In your ~/.zshrc
3769

0 commit comments

Comments
 (0)