# ~/.bashrc # # If not running interactively, don't do anything [[ $- != *i* ]] && return alias ls='ls --color=auto' alias sudo='sudo ' # prompt # PS1='[\u@\h \W]\$ ' # PS1='\n\[\e[1;31m\][\u@\h \W]\$\[\e[0m\] ' #for Root (red) function exitstatus { EXITSTATUS="$?" BOLD="\[\033[1m\]" RED="\[\033[1;31m\]" GREEN="\[\e[32;1m\]" BLUE="\[\e[34;1m\]" OFF="\[\033[m\]" PROMPT="[\u@\h ${BLUE}\W${OFF}" if [ "${EXITSTATUS}" -eq 0 ] then PS1="\n${PROMPT} ${BOLD}${GREEN}:)${OFF} ]\$ " else PS1="\n${PROMPT} ${BOLD}${RED}:(${OFF} ]\$ " fi PS2="${BOLD}>${OFF} " } PROMPT_COMMAND=exitstatus # Look for alias' if [ -f ~/.aliases ]; then . ~/.aliases fi # Editor of choice export EDITOR="nano" if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi