Zsh Readline
A Zsh plugin that recreates PowerShell's PSReadLine ListView prediction in Zsh. You start typing, predictions show up in a dropdown, and you pick one with the arrow keys.
The one thing I missed moving off PowerShell
I spent a long time in PowerShell, and the one thing I genuinely missed switching to Zsh for my Linux and macOS work was PSReadLine's ListView prediction. It shows command predictions in a dropdown you can scroll through, instead of guessing at history yourself.
Zsh's completion system is great, but it works nothing like that. I first tried zsh-autosuggestions, but it draws predictions inline rather than in a list you can browse. Then I tried bending zsh-autocomplete into the behaviour I wanted. It was never built for that, so I kept hitting quirks for my specific use case.
In the end it was easier to write the thing myself than to keep fighting tools that weren't meant for it. Zsh Readline hooks into Zsh's completion and prediction to give you a ListView-style dropdown:
- Predictions in a dropdown list, not inline.
- Arrow keys to move through them.
- Enter or the right arrow to accept the selected one.
- Escape to cancel and go back to what you typed.
Installation
It works with the usual Zsh plugin managers. The full list is in the configuration section of the README.
I use zi, so for me it's one line in .zshrc:
zi light michielvha/zsh-readlineUsage
Once it's loaded it activates on its own. When you start typing:
- Predictions appear in a dropdown list.
- Move through them with ↑ / ↓.
- Press Enter or → to accept the selected prediction.
- Press Escape to cancel and keep what you typed.
You can tweak the appearance and behaviour through a few options, all documented in the README.
