mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-19 19:37:59 +02:00
control-r for bash
This commit is contained in:
parent
f9a01a56cb
commit
710e4dd901
@ -27,3 +27,14 @@ function __hishtory_postcommand() {
|
||||
}
|
||||
PROMPT_COMMAND="__hishtory_postcommand; $PROMPT_COMMAND"
|
||||
export HISTTIMEFORMAT=$HISTTIMEFORMAT
|
||||
|
||||
__history_control_r() {
|
||||
READLINE_LINE=$(hishtory tquery "$READLINE_LINE" | tr -d '\n')
|
||||
READLINE_POINT=0x7FFFFFFF
|
||||
}
|
||||
|
||||
__hishtory_bind_control_r() {
|
||||
bind -x '"\C-r": __history_control_r'
|
||||
}
|
||||
|
||||
[ "$(hishtory config-get enable-control-r)" = true ] && __hishtory_bind_control_r
|
||||
|
Loading…
x
Reference in New Issue
Block a user