Skip to content

Commit 11f59ea

Browse files
committed
plugin/history-eternal
Unlimited history is only possible in _Bash_ version 4.3 and up
1 parent 7387e0d commit 11f59ea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

plugins/available/history-eternal.plugin.bash

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# shellcheck shell=bash
22
about-plugin 'eternal bash history'
33

4+
if [[ ${BASH_VERSINFO[0]} -lt 4 ]] || [[ ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -lt 3 ]]; then
5+
return 1 # Bash version 4.3 introduced the "unlimited" history size capability.
6+
fi
7+
48
# Modify history sizes before changing location to avoid unintentionally
59
# truncating the history file early.
610

0 commit comments

Comments
 (0)