Skip navigation

Harald Markus Wirth


Page Content:

HMW's .bashrc snippet

# HMW's .bashrc

# Set a green prompt for users, and a red prompt for the super user
# Inside a 'screen' session use yellow and inverted yellow
if [ "$HOME" = "/root" ] ;
then PS1color="1;31m" ; PS1symbol="#"
else PS1color="1;34m" ; PS1symbol="$"
fi

if [ "$TERM" = "screen" ] ;
then if [ "$HOME" = "/root" ] ;
     then PS1color="1;43m"
     else PS1color="1;33m"
     fi
fi

PS1="\[\033[$PS1color\]\u@\h\[\033[0;37m\]:\[\033[1m\]\w\[\033[0m\] $PS1symbol "

# Prepend returned error code, if any given
PS1='`_ret=$?; if test $_ret -ne 0; then echo "$_ret:"; set ?=$_ret; unset _ret; fi`'$PS1

#
alias ls='ls'
alias ll='ls -l'
alias la='ls -lA'
alias l='ls -CF'

# Add ~/bin to PATH
PATH=$PATH:~/bin


Content Management:

μCMS α1.6