diff --git a/.install.conf.yaml b/.install.conf.yaml index 8a10d85..7ce9793 100644 --- a/.install.conf.yaml +++ b/.install.conf.yaml @@ -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 diff --git a/bash/rc b/bash/bashrc similarity index 89% rename from bash/rc rename to bash/bashrc index 43f0b49..51169f4 100644 --- a/bash/rc +++ b/bash/bashrc @@ -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" diff --git a/bash/bash.d/aliases b/bash/bashrc.d/aliases.bash similarity index 97% rename from bash/bash.d/aliases rename to bash/bashrc.d/aliases.bash index 62ba717..44e024c 100644 --- a/bash/bash.d/aliases +++ b/bash/bashrc.d/aliases.bash @@ -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' diff --git a/bash/bash.d/colours b/bash/bashrc.d/colours.bash similarity index 100% rename from bash/bash.d/colours rename to bash/bashrc.d/colours.bash diff --git a/bash/bash.d/gpg-agent b/bash/bashrc.d/gpg-agent.bash similarity index 100% rename from bash/bash.d/gpg-agent rename to bash/bashrc.d/gpg-agent.bash diff --git a/bash/bash.d/history b/bash/bashrc.d/history.bash similarity index 100% rename from bash/bash.d/history rename to bash/bashrc.d/history.bash diff --git a/bash/bash.d/network.bash b/bash/bashrc.d/network.bash similarity index 100% rename from bash/bash.d/network.bash rename to bash/bashrc.d/network.bash diff --git a/bash/bash.d/password-store b/bash/bashrc.d/password-store.bash similarity index 100% rename from bash/bash.d/password-store rename to bash/bashrc.d/password-store.bash diff --git a/bash/bash.d/prompt_command b/bash/bashrc.d/prompt_command.bash similarity index 100% rename from bash/bash.d/prompt_command rename to bash/bashrc.d/prompt_command.bash diff --git a/profiles/main.sh b/profiles/main.sh index 77a7cce..9544c7b 100644 --- a/profiles/main.sh +++ b/profiles/main.sh @@ -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