HSTR is a shell history suggest box that aim to replace and/or improve the builtin linux reverse-i-search shell feature.
$ [sudo] add-apt-repository ppa:ultradvorka/ppa && \
> [sudo] apt-get update && \
> [sudo] apt-get install hh
Show possible configuration:
$ hh --show-configuration
I already have some of those lines (or equivalents) so I just added specific hh lines, then looking to hstr configuration documentation I added a few more options:
export HH_CONFIG=hicolor,favorites,casesensitive,blacklist
- hicolor: Get hh in more colors
- favorites: Show favorite commands by default (favorites file should be store in ~/.hh_favorite)
- casesensitive: Make search case sensitive
- blacklist: Skip commands when processing history (blacklist file should be store in ~/.hh_blacklist)
export HH_PROMPT="$USER @ $HOSTNAME : $PWD $ "
if [[ $- =~ .*i.* ]]; then bind '"\C-h": "\C-a hh \C-j"'; fi
for interactive shell then bind hh to Ctrl-h instead of Ctrl-r, this allow us to have the two features available
Sources: