mirror of
https://github.com/atuinsh/atuin.git
synced 2025-06-20 09:58:00 +02:00
Revert "fix(bash): avoid unexpected atuin history start
for keybindings (#1…" (#1727)
This reverts commit 86f2c8e58806020bc04999a5039e18ff10409e59.
This commit is contained in:
parent
4512cd5c7f
commit
032ca19c73
@ -17,14 +17,6 @@ export ATUIN_SESSION
|
|||||||
ATUIN_HISTORY_ID=""
|
ATUIN_HISTORY_ID=""
|
||||||
|
|
||||||
__atuin_preexec() {
|
__atuin_preexec() {
|
||||||
if [[ ! ${BLE_ATTACHED-} ]]; then
|
|
||||||
# With bash-preexec, preexec may be called even for the command run by
|
|
||||||
# keybindings. There is no general and robust way to detect the
|
|
||||||
# command for keybindings, but at least we want to exclude Atuin's
|
|
||||||
# keybindings.
|
|
||||||
[[ $BASH_COMMAND == '__atuin_history'* && $BASH_COMMAND != "$1" ]] && return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
local id
|
local id
|
||||||
id=$(atuin history start -- "$1")
|
id=$(atuin history start -- "$1")
|
||||||
export ATUIN_HISTORY_ID=$id
|
export ATUIN_HISTORY_ID=$id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user