Files
2026-04-03 16:15:31 +08:00

22 lines
574 B
Bash

#!/usr/bin/env bash
export HISTFILE="${HISTFILE:-$HOME/.bash_history}"
export HISTSIZE=50000
export HISTFILESIZE=10000
export HISTCONTROL="ignoreboth:erasedups"
export HISTTIMEFORMAT="%F %T "
shopt -s histappend
shopt -s cmdhist
shopt -s lithist
# Keep history synchronized across interactive shells.
if [[ -z "${BASH_POLYJUICE_HISTORY_INITIALIZED:-}" ]]; then
export BASH_POLYJUICE_HISTORY_INITIALIZED=1
if [[ -n "${PROMPT_COMMAND:-}" ]]; then
PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}"
else
PROMPT_COMMAND="history -a; history -n"
fi
fi