From 61e52883f7647a231e46715d9926b57d44078787 Mon Sep 17 00:00:00 2001 From: Peter Daly-Dickson Date: Fri, 7 Nov 2014 13:50:34 +0000 Subject: [PATCH] Moved arrow-keys-search-history from lib to available plugins --- lib/history.bash | 5 ----- plugins/available/history.plugin.bash | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) create mode 100644 plugins/available/history.plugin.bash diff --git a/lib/history.bash b/lib/history.bash index f278e598..92db21f9 100644 --- a/lib/history.bash +++ b/lib/history.bash @@ -15,11 +15,6 @@ 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 } diff --git a/plugins/available/history.plugin.bash b/plugins/available/history.plugin.bash new file mode 100644 index 00000000..512bbf92 --- /dev/null +++ b/plugins/available/history.plugin.bash @@ -0,0 +1,4 @@ +# enter a few characters and press UpArrow/DownArrow +# to search backwards/forwards through the history +bind '"":history-search-backward' +bind '"":history-search-forward'