Restore bash 4.2 compatibility, only add hook once (#271)

This commit is contained in:
Sandro 2022-02-15 23:54:25 +01:00 committed by GitHub
parent 7651f89261
commit 4223ac6943
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)