From 4223ac69439764208b0baac856e3a2ea5f40a174 Mon Sep 17 00:00:00 2001 From: Sandro Date: Tue, 15 Feb 2022 23:54:25 +0100 Subject: [PATCH] Restore bash 4.2 compatibility, only add hook once (#271) --- src/shell/atuin.bash | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/shell/atuin.bash b/src/shell/atuin.bash index 8f2c86f2..e47e3c98 100644 --- a/src/shell/atuin.bash +++ b/src/shell/atuin.bash @@ -26,9 +26,9 @@ __atuin_history () } -if [[ -v BLE_VERSION ]]; then - blehook PRECMD+=_atuin_precmd - blehook PREEXEC+=_atuin_preexec +if [[ -n "${BLE_VERSION-}" ]]; then + blehook PRECMD-+=_atuin_precmd + blehook PREEXEC-+=_atuin_preexec else precmd_functions+=(_atuin_precmd) preexec_functions+=(_atuin_preexec)