diff --git a/lib/history.bash b/lib/history.bash index 92db21f9..f278e598 100644 --- a/lib/history.bash +++ b/lib/history.bash @@ -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 }