dotfiles/.bashrc

21 lines
491 B
Bash
Raw Normal View History

2012-04-05 05:39:31 -04:00
# Common parameters
2012-05-15 13:55:54 -04:00
alias ls='ls -v --color=auto'
alias ll='ls -val'
2012-04-05 05:39:31 -04:00
alias grep='grep --color'
# Case insensitive matching
2012-05-15 14:50:49 -04:00
shopt -s nocaseglob
2012-07-19 15:39:23 -04:00
PS1='\[\t\]'
# Prompt color based on location
if [ "$SSH_CONNECTION" == "" ]; then
# Yellow prompt for local login
PS1="$PS1\[\e[1;32m\][\u@\h \W]"
else
PS1="$PS1\[\e[1;33m\][\u@\h \W]"
fi
# Ripped from Doug - color based on return code
PS1="$PS1\$(if [ \$? = 0 ]; then echo -e \"\$\"; else echo -e \"\[\033[0;31m\]\$\"; fi)\[\033[0m\] "