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

This commit is contained in:
Peter Daly-Dickson
2014-11-06 20:55:11 +00:00
parent 2ca677caac
commit 5a7476a774

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
}