.TH HH 1 .SH NAME \fBhh\fR \- shell history suggest box .SH SYNOPSIS .B hh [option] [arg1] [arg2]... .SH DESCRIPTION .B hh uses shell history to provide suggest box like functionality for commands used in the past. By default it parses .bash-history file that is filtered as you type a command substring. Commands are not just filtered, but also ordered by a ranking algorithm that considers number of occurences, length and timestamp. In addition hh allows removal of commands from history - for instance with a typo or with a sensitive content. .SH OPTIONNS .TP \fB--show-configuration\fR Show configuration to be added to .bashrc .SH COMMANDS .TP \fBpattern\fR Type to filter shell history. .TP \fBCtrl\-t\fR Toggle case sensitive search. .TP \fBCtrl\-h\fR Toggle history as provided by shell vs. ranked history ordered by the number of occurences, length and timestamp. .TP \fBUP\fR arrow, \fBDOWN\fR arrow, \fBCtrl\-r\fR Navigate in the history list. .TP \fBTAB\fR Choose currently selected item for completion and let user to edit it on the command prompt. .TP \fBENTER\fR Choose currently selected item for completion and execute it. .TP \fBDEL\fR Remove currently selected item from the shell history. .TP \fBCtrl\-x\fR Write changes to shell history and exit. .TP \fBCtrl\-g\fR Exit with empty prompt. .SH INSTALLATION Add the following lines to ~/.bashrc: .nf .sp shopt -s histappend export PROMPT_COMMAND="history \-a; history \-n; ${PROMPT_COMMAND}" bind '"\eC\-r": "\eC\-ahh \eC-j"' .sp .fi The first command ensures that new history items are appended to .bash_history (instead of overwriting). The second command ensures synchronization of the history between memory and file system. The third command binds hh to Ctrl-r shortcut. .SH AUTHOR Written by Martin Dvorak .SH BUGS Report bugs to https://github.com/dvorka/hstr/issues .SH "SEE ALSO" .BR history (1), .BR bash (1)