mirror of
https://github.com/kastdeur/dotfiles.git
synced 2025-06-01 20:09:13 +02:00
[bash] rename bash/rc and bash/bash.d
This commit is contained in:
parent
f67517fdec
commit
6b0d6af2f8
10 changed files with 8 additions and 6 deletions
49
bash/bashrc
Normal file
49
bash/bashrc
Normal file
|
@ -0,0 +1,49 @@
|
|||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||
# for examples
|
||||
|
||||
# Make sure we get system-wide first
|
||||
if [ -r /etc/bash.bashrc ]; then
|
||||
source /etc/bash.bashrc
|
||||
fi
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
[ -z "$PS1" ] && return
|
||||
|
||||
# Make sure we do have profile sourced, otherwise source it
|
||||
[ -z "$DOTFILES" ] && source ~/.profile
|
||||
##
|
||||
[ -z "$DOTFILES" ] && echo ".profile missing" && exit 1
|
||||
|
||||
|
||||
DOTBASH="$DOTFILES/bash"
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
||||
source /etc/bash_completion
|
||||
fi
|
||||
|
||||
# Load main things
|
||||
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"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Try hostname bashrcs
|
||||
if [ -r "$DOTBASH/$HOSTNAME.bashrc" ]; then
|
||||
source "$DOTBASH/$HOSTNAME.bashrc"
|
||||
fi
|
||||
|
||||
if [ -r "$HOME/.bashrc.local" ]; then
|
||||
source "$HOME/.bashrc.local"
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue