To add Syntax Highlighting in Zsh Shell, follow the below steps,
- Open the Terminal on your Mac/Linux.
- Make sure you have brew installed.
% brew --version Homebrew 4.0.19
- Now you will need to install package zsh-syntax-highlighting using HomeBrew.
% brew install zsh-syntax-highlighting
- Make sure to edit the .zshrc file and add the following.
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
- Run the below command to activate syntax highlighting.
% source ~/.zshrc
Now when you will try to run commands with options on your Zsh shell you will see the text getting syntax highlighted (blue and red).
If you face any problems in these steps, do let me know in the comments, I will try to assist.
Facing issues? Have Questions? Post them here! I am happy to answer!
More Posts related to zsh,
- Resolve - zsh: command not found: code
- zsh: command not found [fix] macOS
- How to fix: zsh: command not found: jupyter
- How to make ZSH as the default shell on Ubuntu
- How to Add New Entry to ZSH PATH
- Add Syntax Highlighting in Zsh Shell
- Fix: zsh: command not found: npm after installation (Node.js)
- Fix: zsh: command not found: mysql (Mac XAMPP)
- Ubuntu zsh: command not found: nano
- Fix: ZSH: cd: too many arguments (macOS)
- Fix - cd: no such file or directory: .zshrc
- How to reload zsh shell profile file?
- Fix zsh: permission denied: script.sh
- [fix] zsh: illegal hardware instruction python TensorFlow M1/M2 Mac
- macOS Ventura 13: The default interactive shell is now zsh
- How to Add Autocomplete in Mac Terminal
- Fix - zsh: command not found: pip
- ZSH: exec format error eclipse M1/M2 Mac
- Setting up Zsh Syntax Highlighting
- How to reload Zsh .zshrc Profile
- zsh: command not found: brew [fix]
- How to clear ZSH history of commands executed on Mac Terminal
- Fix - zsh: command not found: conda [macOS]
- Fix: cd: string not in pwd
More Posts:
- How to check if variable is a number in JavaScript (NaN, typeof, regex) - JavaScript
- ls command sort by file size [Linix/UNIX/macOS/bash] - Linux
- Android Activity Main xml stuck loading - Android-Studio
- 'Edit Document' Requires a Windows Sharepoint Services-compatible application and Microsoft Internet Explorer 6.0 or higher - SharePoint
- Removing a key from Python Dict - Python
- How to know the Version of Notepad App on Windows 11 - Windows-11
- Mac Terminal Find Command History - MacOS
- Update Powershell Using Command Line - Powershell