The terminal is an incredibly powerful tool, essential for a wide range of tasks—from managing files to running complex scripts and applications. However, its default interface can feel a bit sparse, especially when compared to the feature-rich environments of modern code editors.
The good news? With just a few tweaks, you can significantly enhance your zsh terminal by adding two invaluable features: autosuggestions and syntax highlighting. If you're setting up a new machine (hello, fresh MacBook!), this is the perfect time to level up your workflow.
Step 1: Install zsh Plugins via Homebrew
To begin, use Homebrew to install the following plugins:
brew install zsh-autosuggestions
brew install zsh-syntax-highlighting
Note: This guide assumes Homebrew is already installed. If not, stay tuned—I'll be covering that in an upcoming post. You can also refer to the plugin documentation for alternative installation methods.
You can find these and many other helpful plugins in the zsh-users GitHub repository.
Step 2: Update Your .zshrc
Configuration
If you don't already have a .zshrc
file in your user directory, create one using the following command:
touch ~/.zshrc
Next, open the file in your preferred text editor and add the following lines to enable the plugins:
source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
These lines ensure the plugins are loaded each time you start a new terminal session.
Step 3: Apply the Changes
To activate your new terminal enhancements, either restart your terminal or run:
source ~/.zshrc
You're All Set!
Test it out! Start typing a command like mkdir test
in your terminal:

- Typing
m
might appear in red, indicating an unrecognized command.
- As you complete it to
mkdir
, the text will turn green—signaling a valid command.
- Once you've run it, typing
m
again will prompt the terminal to suggest mkdir test
, based on your history. Simply press the right arrow key to accept the suggestion.
These small enhancements make a big difference in everyday development tasks—improving both efficiency and accuracy.
Happy coding!