@bbatsov I wonder that you have never seen it.  It is quite a popular extension for Zsh scripts actually, see for instance [syntax-highlighting](https://github.com/zsh-users/zsh-syntax-highlighting), [history-substring-search](https://github.com/zsh-users/zsh-history-substring-search) or [prezto](https://github.com/sorin-ionescu/prezto).