Move internal shell variables and settings to dedicated file

This commit is contained in:
John Mertz 2024-01-31 22:16:09 -07:00
parent b7c91d6522
commit a28908640e
2 changed files with 28 additions and 21 deletions

View File

@ -25,27 +25,9 @@ if [ "$(tty)" == '/dev/tty1' ] && [ ! "$SSH_TTY" ]; then
fi
fi
# don't put duplicate lines or lines starting with space in the history.
shopt -s histappend
HISTCONTROL=ignoreboth
HISTFILE=${HOME}/.spool/bash_history
# append to the history file, don't overwrite it
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=500000
HISTFILESIZE=1000000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# enable programmable completion features
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
# Shell configuration (history, functionality, etc.)
if [ -e ${HOME}/.dotfiles/bash/shell_config ]; then
source ${HOME}/.dotfiles/bash/shell_config ]; then
fi
if [[ -z $TERM_TITLE ]]; then

25
bash/shell_config Normal file
View File

@ -0,0 +1,25 @@
#!/bin/bash
# don't put duplicate lines or lines starting with space in the history.
shopt -s histappend
HISTCONTROL=ignoreboth
HISTFILE=${HOME}/.spool/bash_history
# append to the history file, don't overwrite it
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=500000
HISTFILESIZE=1000000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# enable programmable completion features
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi