My Interesting Zsh Prompt
And why it's better than fish
I already did a post on the steps I took to set up my new macbook for development.
After that post I started using Zsh more and more, and came to realize how much better it could become with some tweaking.
If you just want to replicate this just follow these two steps:
- Install antigen:
- Use this
The first thing I recommend is using antigen. It is something like Pathogen for Vim, a configuration/plugin manager for Zsh.
It works great with Oh My Zsh, which should also be your first step into setting up your zsh shell.
Once antigen is installed the first part of the
.zshrc file is setting that up and loading Oh My Zsh.
Now load all the plugins (bundles) you want, the great thing about antigen is that you can add any plugin from any repository/url:
Automaticcally list directory on cd
I find this really useful, it triggers an
ls whenever you
cd into a directory.
We add the history substring plugin to enable fish style search, first add the plugin:
Now we can bind the search to Up/Down arrows:
### Fish-style autosuggest
A great plugin that shows the first suggestion in light grey as suggestion as you type. It might have some small bugs but for the most part it works great.
Add the plugin:
Set it up: