diff --git a/base/.config/bash/bashrc.d/bash.sh b/base/.config/bash/bashrc.d/bash.sh index 0b1eb32..d184eca 100644 --- a/base/.config/bash/bashrc.d/bash.sh +++ b/base/.config/bash/bashrc.d/bash.sh @@ -1,6 +1,11 @@ #!/usr/bin/env bash #ft=bash +# always save bash history before showing prompt; allow reloading bashrc +if [[ ! "$PROMPT_COMMAND" =~ "history -a" ]]; then + export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" +fi + # Disable capslock if [[ -x $(which setxkbmap) ]] && [[ $(uname) == Linux ]]; then setxkbmap -option ctrl:nocaps