DEV Community

Cover image for 5 Hidden-Gem Zsh Plugins You're Probably Not Using
Technical Savvy
Technical Savvy

Posted on Edited on Originally published at Medium

5 Hidden-Gem Zsh Plugins You're Probably Not Using

Five under-the-radar repos that fix everyday annoyances and give you a faster, safer and more pleasant terminal experience.


Everyone knows zsh-autosuggestions and zsh-syntax-highlighting. But the awesome-zsh-plugins list has over a thousand entries, and some of the most practical ones fly well under the radar.

I went through the list looking for plugins that solve a common annoyance, and kept only repos that are established enough to trust and still useful day to day. Each one makes working in the terminal a little nicer, and together they add up to a much more pleasant experience. These five made the cut.


Edit faster

1. zsh-edit-select

Editing a long command shouldn't feel clumsy. This plugin brings a text-editor-like editing experience right to your shell prompt: select with Shift+Arrow, then delete, type or paste over a selection to replace it, and use Ctrl/Cmd +C / X / V / Z for copy, cut, paste and undo. And you can also apply all of these editing operations to mouse selections. It makes everyday editing feel far more natural.

The catch: it needs a few keybindings set in your terminal config, though the README includes a guided installer for common terminals.

github.com/Michael-Matta1/zsh-edit-select


Stay safe

2. zsh-safe-rm

A wrapper around shell-safe-rm that makes rm move files to your OS trash instead of deleting them forever. A slip of the finger becomes a quick recovery instead of a disaster, which makes the whole terminal feel more relaxed to work in. It also adds a del alias, which is a good habit to build in case you ever land on a machine without the plugin.

You can still bypass it with \rm or command rm when you really mean it. The last commit was in 2024, but it's a small, stable wrapper that doesn't need constant updates.

antidote install mattmc3/zsh-safe-rm
Enter fullscreen mode Exit fullscreen mode

github.com/mattmc3/zsh-safe-rm


Start up faster

3. zsh-smartcache

Those eval "$(rbenv init -)" lines in your .zshrc add up, and you feel it every time you open a new tab. Smartcache works like evalcache, but it also refreshes the cache in the background and can cache completions. The author's benchmark shows rbenv init dropping from about 48 ms to about 23.5 ms, so your prompt shows up sooner and the shell feels snappier.

# before
eval "$(rbenv init -)"

# after
smartcache eval rbenv init -
Enter fullscreen mode Exit fullscreen mode

github.com/QuarticCat/zsh-smartcache

4. ez-compinit

compinit is one of the slowest and most confusing parts of a zsh config, because you have to get the load order right. ez-compinit wraps it so completion setup is deferred until your fpath is fully populated, with sensible defaults and a choice of completion styles. The payoff is a shell that opens quickly and completes reliably, without the setup headaches.

Load it near the top of your config, before anything that calls compdef.

zstyle ':plugin:ez-compinit' 'compstyle' 'zshzoo'
Enter fullscreen mode Exit fullscreen mode

github.com/mattmc3/ez-compinit


Read your output in color

5. zsh-bat

Plain cat output and gray man pages are hard on the eyes. zsh-bat swaps cat for bat, so files print with syntax highlighting and line numbers, and it adds syntax highlighting to man pages as well. Reading files and docs in the terminal becomes a much nicer experience. Your muscle memory stays the same, and the real cat is still there as rcat whenever you need it.

You need bat installed first, since the plugin does nothing without it. Then clone it into your Oh My Zsh custom plugins directory and add it to your plugin list.

git clone https://github.com/fdellwing/zsh-bat.git $ZSH_CUSTOM/plugins/zsh-bat

# in ~/.zshrc
plugins=(... zsh-bat)
Enter fullscreen mode Exit fullscreen mode

github.com/fdellwing/zsh-bat


Extra gem (bonus)

6. clipboard

A tiny cross-platform clipboard helper that works on macOS, X11/Wayland, WSL and MSYS2/Cygwin. It gives you pbcopy and pbpaste everywhere, plus a clip wrapper that copies when you pipe into it and prints the clipboard when you don't.

That means your cat file | pbcopy muscle memory works on any machine, and moving between systems feels seamless instead of jarring.

plugins=(... clipboard)   # oh-my-zsh
Enter fullscreen mode Exit fullscreen mode

github.com/zpm-zsh/clipboard


Got a hidden gem of your own? Drop it in the comments.

Top comments (0)