Dotfile refactoring.

This commit is contained in:
David Tomaschik
2015-12-10 19:37:53 -08:00
parent 138f9ef3c3
commit ec69fed5d2
5 changed files with 37 additions and 52 deletions

View File

@@ -1,6 +1,10 @@
# Load env first
if [ -f $HOME/.env ] ; then source $HOME/.env ; fi
# History settings
HISTCONTROL=ignoredups:ignorespace
shopt -s histappend
shopt -s expand_aliases
HISTSIZE=1000
HISTFILESIZE=0
@@ -10,23 +14,12 @@ shopt -s checkwinsize
# Fancier outputs
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
case "$TERM" in
xterm-color) color_prompt=yes;;
esac
force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
@@ -45,3 +38,5 @@ fi
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
if [[ -e $HOME/.aliases ]] ; then source $HOME/.aliases ; fi