Add support for blesh (#267)
* Fix intendation * Add support for blesh See https://github.com/akinomyoga/ble.sh/wiki/Manual-%C2%A71-Introduction#user-content-fn-blehook for more details
This commit is contained in:
parent
c2dd3322c4
commit
7651f89261
1 changed files with 15 additions and 11 deletions
|
@ -11,7 +11,6 @@ _atuin_precmd() {
|
||||||
|
|
||||||
[[ -z "${ATUIN_HISTORY_ID}" ]] && return
|
[[ -z "${ATUIN_HISTORY_ID}" ]] && return
|
||||||
|
|
||||||
|
|
||||||
(RUST_LOG=error atuin history end "$ATUIN_HISTORY_ID" --exit $EXIT &) > /dev/null 2>&1
|
(RUST_LOG=error atuin history end "$ATUIN_HISTORY_ID" --exit $EXIT &) > /dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,8 +26,13 @@ __atuin_history ()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
preexec_functions+=(_atuin_preexec)
|
if [[ -v BLE_VERSION ]]; then
|
||||||
precmd_functions+=(_atuin_precmd)
|
blehook PRECMD+=_atuin_precmd
|
||||||
|
blehook PREEXEC+=_atuin_preexec
|
||||||
|
else
|
||||||
|
precmd_functions+=(_atuin_precmd)
|
||||||
|
preexec_functions+=(_atuin_preexec)
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -z $ATUIN_NOBIND ]]; then
|
if [[ -z $ATUIN_NOBIND ]]; then
|
||||||
bind -x '"\C-r": __atuin_history'
|
bind -x '"\C-r": __atuin_history'
|
||||||
|
|
Loading…
Reference in a new issue