Some files I use to configure my shell environment.
-
profileThe main bash profile. Replaces
.profileand.bash_profile.-
Ensures
/sbinand/usr/sbinare in the path. -
Sets history to ignore common commands like
clearandls. -
Sets history to ignore duplicate commands.
-
-
bashrcReplaces
.bashrcfile to configure interactive sessions.-
Sets history to append after every commands.
-
Sets up a fancy prompt unless you are root (details below).
-
Adds aliases for common commands.
-
-
promptrcSourced by
bashrcto create the fancy prompt.-
Creates a two line prompt.
-
Hostname turns red if last command failed.
-
Hostname is inversed for remote ssh sessions.
-
Shows branch name when currect directy is a git repo.
-
Git branch name turn magenta when repo is dirty, green when clean.
-
Command number is displayed for easy resue.
-
- Add the variable
DOTFILESto your bash profile and set it to the path of your dotfiles git checkout. Export it so the other scripts can use it.
export DOTFILES="$HOME/Workspace/dotfiles"- Add a stanza to source the main profile.
PROFILE="$DOTFILES/profile"
if [[ -f $PROFILE ]]
then
source $PROFILE
fi- (Make sure you have gnu stow installed first) Move your .bashrc and run the stow.sh script.
$ mv $HOME/.bashrc $HOME/.bashrc-orig
$ ./stow.sh