If you're using zsh then substring history: https://github.com/zsh-users/zsh-history-substring-search and highlighting: https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md are huge timesavers.