mirror of
https://github.com/kastdeur/dotfiles.git
synced 2025-05-15 12:29:23 +02:00
Jobs in ps1, renamed bashrc to bash/rc
This commit is contained in:
parent
da8ef4041a
commit
8fc77963e6
6 changed files with 32 additions and 7 deletions
46
bash/rc
Normal file
46
bash/rc
Normal file
|
@ -0,0 +1,46 @@
|
|||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||
# for examples
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
[ -z "$PS1" ] && return
|
||||
|
||||
[ -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
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
|
||||
# Load main things
|
||||
if [ -d "$DOTBASH/bash.d" ]; then
|
||||
for f in colours aliases history ps1
|
||||
do
|
||||
source "$DOTBASH/bash.d/$f"
|
||||
done
|
||||
fi
|
||||
|
||||
# Try custom bashrc
|
||||
#if [[ $HOSTNAME == 'hg'* && -r "hg.bashrc"]]; then
|
||||
# source "hg.bashrc"
|
||||
#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