[bash] rename bash/rc and bash/bash.d

This commit is contained in:
Eric Teunis de Boone 2022-02-10 20:07:37 +01:00
parent f67517fdec
commit 6b0d6af2f8
10 changed files with 8 additions and 6 deletions

View File

@ -6,7 +6,7 @@
- clean: ['~']
- link:
~/.bashrc: bash/rc
~/.bashrc: bash/bashrc
~/.bash_profile: bash/profile
~/.config/git/config: git/config
~/.config/git/ignore_global: git/ignore

View File

@ -30,8 +30,8 @@ if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
fi
# Load main things
if [ -d "$DOTBASH/bash.d" ]; then
for f in colours aliases history prompt_command password-store
if [ -d "$DOTBASH/bashrc.d" ]; then
for f in colours.bash aliases.bash history.bash prompt_command.bash password-store.bash network.bash
do
if [ -r "$DOTBASH/bash.d/$f" ]; then
source "$DOTBASH/bash.d/$f"

View File

@ -22,7 +22,7 @@ alias l='ls -CF'
alias mkdir='mkdir -p -v'
# Use vim if possible instead of vi
if [[ $(command -v vim) ]]; then
if command -v vim > /dev/null; then
alias vi='vim'
else
alias vim='vi'

View File

@ -40,7 +40,9 @@ then
fi
# if this is BASH source BASHRC
if [ "$BASH" ] && [ -f $DOTFILES/bash/rc ]
DOTBASHRC="$DOTFILES/bash/bashrc"
if [ "$BASH" ] && [ -r "$DOTBASHRC" ]
then
source $DOTFILES/bash/rc
source "$DOTBASHRC"
fi
unset DOTBASHRC