Is there a open source terminal that is friendly to hacking? I want to add "next command prediction" to my terminal but I am at a loss to identify the correct terminal. iTerms2's architecture unfortunately did not allow me to do that.
I’d look at zsh autosuggestions as a possible starting point. It’s based on your history and suggests previous commands based on what you type, but there’s no reason it couldn’t provide a suggestion “immediately”. https://github.com/zsh-users/zsh-autosuggestions
As others have suggested, use zsh autosuggestions, personally I like to use oh-my-zsh as the framework for adding zsh plugins, but I don't think its required. As for the terminal emulator, iTerm is stellar, but the terminal emulator does not handle things such as autosuggestions, that's all up to the shell.