Added ability to enter a few characters at the prompt and then search backwards/forwards through history with up and down arrows

pull/364/head
Peter Daly-Dickson 2014-11-06 20:55:11 +00:00
parent 2ca677caac
commit 5a7476a774
1 changed files with 5 additions and 0 deletions

View File

@ -15,6 +15,11 @@ export HISTSIZE=5000
export AUTOFEATURE=true autotest
# enter a few characters and press UpArrow/DownArrow
# to search backwards/forwards through the history
bind '"":history-search-backward'
bind '"":history-search-forward'
function rh {
history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head
}