mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-04-17 11:35:32 +08:00
docs: final candidate draft for sourcing on package installs - INSTALL.md
This commit is contained in:
parent
69acf578ec
commit
6cc600335a
27
INSTALL.md
27
INSTALL.md
@ -34,13 +34,30 @@ First, install the package:
|
|||||||
|
|
||||||
See also [repology's cross-distro index](https://repology.org/metapackage/zsh-syntax-highlighting/versions)
|
See also [repology's cross-distro index](https://repology.org/metapackage/zsh-syntax-highlighting/versions)
|
||||||
|
|
||||||
Second, enable zsh-syntax-highlighting by adding the following line to the end of your .zshrc,
|
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:
|
||||||
|
|
||||||
* On most Linux distributions (except perhaps NixOS): `source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh`
|
* On most Linux distributions (except perhaps NixOS):
|
||||||
* Mac OS X / Homebrew: `somewhere under /opt under Homebrew (please confirm)`
|
|
||||||
* NetBSD and OpenBSD: `source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh`
|
|
||||||
|
|
||||||
Then restart zsh (such as by opening a new instance of your terminal emulator).
|
```zsh
|
||||||
|
echo "source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ${ZDOTDIR:-$HOME}/.zshrc
|
||||||
|
```
|
||||||
|
|
||||||
|
* Mac OS X / Homebrew, NetBSD and OpenBSD:
|
||||||
|
|
||||||
|
```zsh
|
||||||
|
echo "source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ${ZDOTDIR:-$HOME}/.zshrc
|
||||||
|
```
|
||||||
|
|
||||||
|
Then restart zsh (such as by opening a new instance of your terminal emulator).
|
||||||
|
|
||||||
|
If your .zshrc file is somewhere other than `/home`, or if above the command fails, add the `source` command manually **at the end** of your `.zshrc`:
|
||||||
|
|
||||||
|
* On most Linux distributions (except perhaps NixOS):
|
||||||
|
`source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh`
|
||||||
|
* Mac OS X / Homebrew, NetBSD and OpenBSD:
|
||||||
|
`source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh`
|
||||||
|
|
||||||
|
Then restart zsh.
|
||||||
|
|
||||||
### In your ~/.zshrc
|
### In your ~/.zshrc
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user