Please bear with us as we work to restore functionality to dotfiles.org.
alias ls='ls --color=auto --group --file-type'
alias lw='ls -ahxp'
alias ll='ls -lashp'
alias grep='grep --color=auto -i'
export GREP_COLOR="1;31"
alias rm="rm -iv"
alias mv="mv -iv"
alias cp="cp -iv"
alias back='cd $OLDPWD'
# enable command and file completion after sudo
complete -f -c sudo
if [ $UID -eq 0 ]; then
PS1="\[\033[1;31m\]\u@\H \[\033[32m\]\w/ \n\[\033[1;37m\]#>\[\033[0m\] "
else
PS1="\[\033[1;34m\]\u@\H \[\033[32m\]\w/ \n\[\033[1;34m\]$>\[\033[0m\] "
fi
# extract archives -- usage: extract
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjvpf $1 ;;
*.tar.gz) tar xzvpf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar e $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xvpf $1 ;;
*.tbz2) tar xjvpf $1 ;;
*.tgz) tar xzvpf $1 ;;
*.zip) unzip "$1" ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}