How To Install zsh-syntax-highlighting on CentOS 8
Introduction
In this tutorial we learn how to install zsh-syntax-highlighting
on CentOS 8.
What is zsh-syntax-highlighting
This package provides syntax highlighting for the shell zsh. It enables highlighting of commands whilst they are typed at a zsh prompt into an interactive terminal. This helps in reviewing commands before running them, particularly in catching syntax errors.
We can use yum
or dnf
to install zsh-syntax-highlighting
on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install zsh-syntax-highlighting.
Install zsh-syntax-highlighting on CentOS 8 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install zsh-syntax-highlighting
using dnf
by running the following command:
sudo dnf -y install zsh-syntax-highlighting
Install zsh-syntax-highlighting on CentOS 8 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install zsh-syntax-highlighting
using yum
by running the following command:
sudo yum -y install zsh-syntax-highlighting
How To Uninstall zsh-syntax-highlighting on CentOS 8
To uninstall only the zsh-syntax-highlighting
package we can use the following command:
sudo dnf remove zsh-syntax-highlighting
zsh-syntax-highlighting Package Contents on CentOS 8
/usr/share/doc/zsh-syntax-highlighting
/usr/share/doc/zsh-syntax-highlighting/INSTALL.md
/usr/share/doc/zsh-syntax-highlighting/README.md
/usr/share/doc/zsh-syntax-highlighting/all.md
/usr/share/doc/zsh-syntax-highlighting/changelog.md
/usr/share/doc/zsh-syntax-highlighting/highlighters
/usr/share/doc/zsh-syntax-highlighting/highlighters.md
/usr/share/doc/zsh-syntax-highlighting/highlighters/brackets.md
/usr/share/doc/zsh-syntax-highlighting/highlighters/cursor.md
/usr/share/doc/zsh-syntax-highlighting/highlighters/line.md
/usr/share/doc/zsh-syntax-highlighting/highlighters/main.md
/usr/share/doc/zsh-syntax-highlighting/highlighters/pattern.md
/usr/share/doc/zsh-syntax-highlighting/highlighters/regexp.md
/usr/share/doc/zsh-syntax-highlighting/highlighters/root.md
/usr/share/licenses/zsh-syntax-highlighting
/usr/share/licenses/zsh-syntax-highlighting/COPYING.md
/usr/share/zsh-syntax-highlighting
/usr/share/zsh-syntax-highlighting/.revision-hash
/usr/share/zsh-syntax-highlighting/.version
/usr/share/zsh-syntax-highlighting/highlighters
/usr/share/zsh-syntax-highlighting/highlighters/brackets
/usr/share/zsh-syntax-highlighting/highlighters/brackets/brackets-highlighter.zsh
/usr/share/zsh-syntax-highlighting/highlighters/cursor
/usr/share/zsh-syntax-highlighting/highlighters/cursor/cursor-highlighter.zsh
/usr/share/zsh-syntax-highlighting/highlighters/line
/usr/share/zsh-syntax-highlighting/highlighters/line/line-highlighter.zsh
/usr/share/zsh-syntax-highlighting/highlighters/main
/usr/share/zsh-syntax-highlighting/highlighters/main/main-highlighter.zsh
/usr/share/zsh-syntax-highlighting/highlighters/pattern
/usr/share/zsh-syntax-highlighting/highlighters/pattern/pattern-highlighter.zsh
/usr/share/zsh-syntax-highlighting/highlighters/regexp
/usr/share/zsh-syntax-highlighting/highlighters/regexp/regexp-highlighter.zsh
/usr/share/zsh-syntax-highlighting/highlighters/root
/usr/share/zsh-syntax-highlighting/highlighters/root/root-highlighter.zsh
/usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
References
Summary
In this tutorial we learn how to install zsh-syntax-highlighting
on CentOS 8 using yum and dnf.