aboutsummaryrefslogtreecommitdiffstats
path: root/src/shell/atuin.bash
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-02-15 23:54:25 +0100
committerGitHub <noreply@github.com>2022-02-15 22:54:25 +0000
commit4223ac69439764208b0baac856e3a2ea5f40a174 (patch)
treebe1ef52f9cd47d7c1329943269787c0cf2f0a538 /src/shell/atuin.bash
parentAdd support for blesh (#267) (diff)
downloadatuin-4223ac69439764208b0baac856e3a2ea5f40a174.zip
Restore bash 4.2 compatibility, only add hook once (#271)
Diffstat (limited to '')
-rw-r--r--src/shell/atuin.bash6
1 files 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)