Ahmad Awais

NAVIGATE


SHARE


Command-Line ZSH Syntax Highlighting Is Dope!

Ahmad AwaisAhmad Awais

I’m a command-line power-user. I do more things with command line than I probably should. So, I have built a lot of small workflows to help me with daily stuff.

For example, Command-Line ZSH Syntax Highlighting is a total win. It helps me visualize if I am about to run a dangerous command rm -rf * (anyone?) β€” and also if a program exists in the $PATH or not.

 zsh-syntax-highlight

Syntax highlight in ZSH is awesome. It highlights what you’re tying in real time.

To use it, cloneΒ zsh-syntax-highlightingΒ from Github and add the following commands to yourΒ .zshrc. They’ll enable the common highlighters, and add a warning highlight when you try and useΒ rm -rf.

Happy hacking. Peace! ✌️

Helping businesses build developer-led adoption for 10+ yrs.
VP of Developer Relations and Google Developers Advisory Board (gDAB) founding member.

πŸ“Ÿ Edutainer at Node.js CLI Automation course (100 videos Β· 22 Projects) & VSCode.pro course. Over 36K devs learning. 🎩 Award-winning Open Source Engineer & Dev Advocate 🦊 Google Developers Expert Web DevRel πŸš€ Mars Ingenuity Helicopter code contributor πŸ† 8th GitHub Stars Award recipient 🌳 Node.js foundation Community Committee Outreach Lead, Member Linux Foundation, OpenAPI Business Governing Board, and DigitalOcean Navigator.

✌️ Author of various open-source dev-tools and software libraries used by millions of developers worldwide ⓦ WordPress Core Developer πŸ“£ TEDx Speaker with 100+ international talks.

✨ As quoted by: Satya Nadella Β· CEO of Microsoft β€” Awais is an awesome example for developers.
πŸ™Œ Leading developers and publishing technical content for over a decade πŸ’œ Loves his wife (Maedah) ❯ Read more about Ahmad Awais.

πŸ‘‹β€¦ Awais is mostly active on Twitter @MrAhmadAwais

πŸ“¨

Developers Takeaway

Stay ahead in the web dev community with Ahmad's expert insights on open-source, developer relations, dev-tools, and side-hustles. Insider-email-only-content. Don't miss out - subscirbe for a dose of professional advice and a dash of humor. No spam, pinky-promise!

✨ 172,438 Developers Already Subscribed
Comments 1
  • noelspringer
    Posted on

    noelspringer noelspringer

    Reply Author

    Hi Ahmad, zsh is cool. You might also like skwp.github.io/dotfiles/ (YADR). It uses Prezto github.com/sorin-ionescu/prezto and the ZSH Syntax Highlighting is incorporated by Prezto.

    YADR has a lot of neat git aliases and tweaks for Homebrew. Also, a very useful vimrc file if you use vim. Just the aliases are worth a look.

    I switched to YADR some time ago from Oh My ZSH and it’s noticeably faster.