feat(Bash): support bash
This commit is contained in:
13
bash/settings/exports.sh
Normal file
13
bash/settings/exports.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Preferred editor for local and remote sessions.
|
||||
if command -v helix >/dev/null 2>&1; then
|
||||
export EDITOR="helix"
|
||||
elif command -v nvim >/dev/null 2>&1; then
|
||||
export EDITOR="nvim"
|
||||
else
|
||||
export EDITOR="vim"
|
||||
fi
|
||||
|
||||
export OS="$(uname -s)"
|
||||
export BASH_POLYJUICE_DEFAULT_PYTHON_VENV="$HOME/.default_pyvenv/.venv"
|
||||
21
bash/settings/history.sh
Normal file
21
bash/settings/history.sh
Normal 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
|
||||
Reference in New Issue
Block a user