Added ability to enter a few characters at the prompt and then search backwards/forwards through history with up and down arrows
parent
2ca677caac
commit
5a7476a774
|
|
@ -15,6 +15,11 @@ export HISTSIZE=5000
|
||||||
|
|
||||||
export AUTOFEATURE=true autotest
|
export AUTOFEATURE=true autotest
|
||||||
|
|
||||||
|
# enter a few characters and press UpArrow/DownArrow
|
||||||
|
# to search backwards/forwards through the history
|
||||||
|
bind '"[A":history-search-backward'
|
||||||
|
bind '"[B":history-search-forward'
|
||||||
|
|
||||||
function rh {
|
function rh {
|
||||||
history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head
|
history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue