feat(Bash): support bash

This commit is contained in:
2026-04-03 16:15:31 +08:00
parent e384a4ad0c
commit d6e7b8b81f
13 changed files with 409 additions and 0 deletions

21
bash/settings/history.sh Normal file
View File

@@ -0,0 +1,21 @@
#!/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