Add command prompt modifications/
This commit is contained in:
parent
237f3e4be8
commit
9e8d716be2
1 changed files with 13 additions and 0 deletions
13
.bashrc
13
.bashrc
|
@ -5,3 +5,16 @@ alias grep='grep --color'
|
||||||
|
|
||||||
# Case insensitive matching
|
# Case insensitive matching
|
||||||
shopt -s nocaseglob
|
shopt -s nocaseglob
|
||||||
|
|
||||||
|
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\] "
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue