zsh-users/zsh-autosuggestions — reverse-engineered prompt

Reverse engineered prompt

Build me a small zsh plugin that gives fish style autosuggestions right in the shell. As I type, I want it to show the rest of a likely command inline after the cursor in a subtle gray style, mainly based on command history, with an option to also use normal completion results when history does not help. If I press the right arrow or End at the end of the line, it should accept the suggestion, and if I move forward by word it should be able to accept part of it.

Please give it sensible defaults and make it feel fast and unobtrusive. I want simple config for the suggestion color and style, the order of suggestion strategies, disabling suggestions for very long pasted input, ignoring certain history patterns, and turning async behavior on or off depending on zsh version support. Also include commands or widgets I can bind for accept, clear, fetch, execute, enable, disable, and toggle. Make installation and setup easy for a normal zsh config. Look up current zsh docs online if you need to.

Want more depth? Deep Reverse