Add tmux to bashrc

This commit is contained in:
Antonio J. Delgado 2022-05-05 11:18:16 +03:00
parent bcf6916f18
commit 9f54978e3e

14
bash_rc
View file

@ -10,7 +10,7 @@ esac
# Source global definitions # Source global definitions
if [ -f /etc/bashrc ]; then if [ -f /etc/bashrc ]; then
# shellcheck disable=SC1091 # shellcheck disable=SC1091
. /etc/bashrc source /etc/bashrc
fi fi
# Uncomment the following line if you don't like systemctl's auto-paging feature: # Uncomment the following line if you don't like systemctl's auto-paging feature:
@ -94,7 +94,7 @@ alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo
if [ -f ~/.bash_aliases ]; then if [ -f ~/.bash_aliases ]; then
# shellcheck disable=SC1090 # shellcheck disable=SC1090
. ~/.bash_aliases source ~/.bash_aliases
fi fi
# enable programmable completion features (you don't need to enable # enable programmable completion features (you don't need to enable
@ -103,10 +103,10 @@ fi
if ! shopt -oq posix; then if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then if [ -f /usr/share/bash-completion/bash_completion ]; then
# shellcheck disable=SC1091 # shellcheck disable=SC1091
. /usr/share/bash-completion/bash_completion source /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then elif [ -f /etc/bash_completion ]; then
# shellcheck disable=SC1091 # shellcheck disable=SC1091
. /etc/bash_completion source /etc/bash_completion
fi fi
fi fi
@ -117,6 +117,10 @@ export SCREENDIR="${HOME}/.screen"
mkdir -p "${HOME}/.bashrc.d" mkdir -p "${HOME}/.bashrc.d"
while read -r bashrc_file while read -r bashrc_file
do do
if [ -z "${bashrc_file}" ]; then
# shellcheck disable=SC1090 # shellcheck disable=SC1090
source "${bashrc_file}" source "${bashrc_file}"
done <<< "$(find "${HOME}/.bashrc.d" -type f)" fi
done <<< "$(find "${HOME}/.bashrc.d" -type f | sort)"
[ -z "$TMUX" ] && { tmux attach || exec tmux new-session && exit;}