DEV Community

Sean Marchetti
Sean Marchetti

Posted on

3

Styling zsh Completions

I spend a good portion of my time in the terminal, so I recently decided to learn how to configure it. I use zsh, which is extremely customizable, and there are plenty of tutorials out there to help you get started. One of the best parts of zsh is its completion system. Typing a command and hitting tab will show you it’s options and arguments.

Before

The default styling is functional, but it’s not pretty, and we can fix it. Adding the following lines to your .zshrc produces a much cleaner result.

zstyle ':completion:\*' menu select
zstyle ':completion:\*:descriptions' format $'\\n%F{yellow}%U%B%d%b%u%f\\n'
zstyle ':completion:\*' group-name ''

After

Of course, there are many things you can tweak with zstyle and I encourage you to check it out by using the completion system.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay