Added root prompt and mysql alias

For some reason, I couldn't get the prompt ($) to show as root (#) so I went ahead and added a conditional to do so. Also made the cyan embelishment red for extra emphasis.
This commit is contained in:
Josh Sherman 2011-12-04 14:18:06 -05:00
parent bd274b5075
commit 97f3e684eb

View file

@ -44,13 +44,21 @@ export D_CYAN="\[\033[2;36m\]"
export D_WHITE="\[\033[2;37m\]"
# Prompt
export PS1="\n$D_CYAN╷┏ $D_GREEN\t$RESET:$D_WHITE\u$RESET@$D_MAGENTA\h$RESET:$B_BLUE\w$YELLOW\$(__git_ps1)\n$D_CYAN╵┗ $D_WHITE\$ $RESET"
if [ `whoami` == "root" ];
then
export PS1="\n$B_RED╷┏ $D_GREEN\t$RESET:$D_WHITE\u$RESET@$D_MAGENTA\h$RESET:$B_BLUE\w$YELLOW\$(__git_ps1)\n$B_RED╵┗ $D_WHITE# $RESET"
else
export PS1="\n$D_CYAN╷┏ $D_GREEN\t$RESET:$D_WHITE\u$RESET@$D_MAGENTA\h$RESET:$B_BLUE\w$YELLOW\$(__git_ps1)\n$D_CYAN╵┗ $D_WHITE\$ $RESET"
fi
export PS2="$D_WHITE> $RESET"
# Aliases
alias ac="sudo apt-cache"
alias ag="sudo apt-get"
# apt-*
alias ac="sudo apt-cache"
alias ag="sudo apt-get"
# git
alias ga="git add"
alias gaa="git add $(git rev-parse --show-toplevel)" # Adds all new files from the project root
alias gc="git commit"
@ -73,5 +81,7 @@ alias grr="git remote rm"
alias grro="git remote rm origin"
alias grm="git rm"
alias gs="git status"
# mysql
alias msk="mysql scenekids"
fortune