Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fish-style Autosuggestion in Zsh?

Is there a way to do the type of auto-suggestion Fish does in Zsh?

like image 306
Eli Avatar asked Jun 20 '13 20:06

Eli


People also ask

How do I enable autocompletion in zsh?

zsh-autocomplete adds real-time type-ahead autocompletion to Zsh. Find as you type, then press Tab to insert the top completion, Shift Tab to insert the bottom one, or ↓ / PgDn to select another completion.


2 Answers

https://github.com/tarruda/zsh-autosuggestions does exactly what I wanted. If you want fish-style autopredictions in zsh, use that.

like image 130
Eli Avatar answered Oct 01 '22 19:10

Eli


Zsh has predict, run the commands below this and then hit Ctrl-X 1 or just type predict-on to give it a try

#-*-shell-script-*- autoload predict-on autoload predict-off  # you may also wish to bind it to some keys... zle -N predict-on zle -N predict-off bindkey '^X1' predict-on bindkey '^X2' predict-off 
like image 30
Francisco Avatar answered Oct 01 '22 20:10

Francisco