Setting up Zsh Syntax Highlighting


Zsh Shell Syntax Highlighting
Zsh Shell Syntax Highlighting

zsh-syntax-highlighting is a GitHub repo that you can setup along with Zsh to get System Highlighting for commands just like Fish-Shell,



3 Easy steps to set up Zsh Syntax Highlighting

  1. Clone git repo: git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
    % git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
    Cloning into 'zsh-syntax-highlighting'...
    remote: Enumerating objects: 7016, done.
    remote: Counting objects: 100% (103/103), done.
    remote: Compressing objects: 100% (51/51), done.
    remote: Total 7016 (delta 50), reused 80 (delta 46), pack-reused 6913
    Receiving objects: 100% (7016/7016), 1.52 MiB | 2.22 MiB/s, done.
    Resolving deltas: 100% (4725/4725), done.
  2. Now execute command: echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
  3. To enable syntax highlighting,
    source ./zsh-syntax-highlighting/zsh-syntax-highlighting.zsh


Reference and more details: https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md



Advertisements
Try Out Code2care Dev Tools:

Advertisements

Advertisements
Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and software developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include learnings, tutorials, trouble-shooting steps, video tutorials, code snippets, how-to, blogs, articles, etc.

🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.