From 221a8078816baf213ef2fddbbade96497557d8d3 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Sat, 1 Jan 2022 20:57:37 -0800 Subject: [PATCH] plugin/history-eternal Unlimited history is only possible in _Bash_ version 4.3 and up --- plugins/available/history-eternal.plugin.bash | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/available/history-eternal.plugin.bash b/plugins/available/history-eternal.plugin.bash index 178332142a..00e6fe5e69 100644 --- a/plugins/available/history-eternal.plugin.bash +++ b/plugins/available/history-eternal.plugin.bash @@ -1,6 +1,10 @@ # shellcheck shell=bash about-plugin 'eternal bash history' +if [[ ${BASH_VERSINFO[0]} -lt 4 ]] || [[ ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -lt 3 ]]; then + return 1 # Bash version 4.3 introduced the "unlimited" history size capability. +fi + # Modify history sizes before changing location to avoid unintentionally # truncating the history file early.