-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1982 from cornfeedhobo/align-history-plugins
Wholesale cleanup of all history plugins
- Loading branch information
Showing
9 changed files
with
42 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# shellcheck shell=bash | ||
about-plugin 'eternal bash history' | ||
|
||
# Load after the history plugin | ||
# BASH_IT_LOAD_PRIORITY: 375 | ||
|
||
# Modify history sizes before changing location to avoid unintentionally | ||
# truncating the history file early. | ||
|
||
# "Numeric values less than zero result in every command being saved on the history list (there is no limit)" | ||
export HISTSIZE=-1 | ||
|
||
# "Non-numeric values and numeric values less than zero inhibit truncation" | ||
export HISTFILESIZE='unlimited' | ||
|
||
# Use a custom history file location so history is not truncated | ||
# if the environment ever loses this "eternal" configuration. | ||
HISTDIR="${XDG_STATE_HOME:-${HOME?}/.local/state}/bash" | ||
[[ -d ${HISTDIR?} ]] || mkdir -p "${HISTDIR?}" | ||
export HISTFILE="${HISTDIR?}/history" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters