.bashrc

# -*- mode: sh; -*-

umask 077

source ${HOME}/.bashd/env
source ${HOME}/.bashd/alias
source ${HOME}/.bashd/settings

if [[ "$-" =~ i ]] ; then

    cat <<EOF
\033[1;36m
     .-.
     /v\\
    // \\\\   Fear the Penguin!  
   /(   )\\
    ^^-^^
\033[32m
EOF

    fortune -a
    echo '\033[m'

fi

.bashd/env

# -*- mode: sh; -*-

export CZREN_BAK
export EDITOR='emacs -nw'
export EMAIL=''
export LS_COLORS='no=00:fi=00:di=01;34:ln=04;31:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;33:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tbz2=00;31:*.png=01;35:*.bmp=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.pcx=01;35:*.ppm=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.wav=00;32:*.mp3=00;32:*.au=00;32:*.aiff=00;32:*.mid=00;32:*.voc=00;32:*.c=00;32:*.cc=00;32:*.h=00;32:*.hh=00;32:*.tex=00;32:*.o=00;35:*~=40;37:*akefile=04;35:*EADME=04;31:*index.html.gz=04;36:*index.html=04;36:*index.htm.gz=04;36:*index.htm=04;36:*class=00;32:'
export PAGER='w3m'
export PAPERSIZE='a4'
export PATH="${HOME}/.bin:${HOME}/.local/bin:${PATH}"
export PYTHONPATH="${HOME}/.local/lib/python"
export REPLYTO=''
export TEXINPUTS="${HOME}/.local/share/tex"

unset LANG
unset LC_ALL
export LC_COLLATE='POSIX'
export LC_DATE='POSIX'
export LC_CTYPE='en_GB.utf8'
export LC_NUMERIC='en_GB.utf8'
export LC_MONETARY='en_GB.utf8'
export LC_MESSAGES='en_GB.utf8'
export LC_PAPER='en_GB.utf8'
export LC_NAME='en_GB.utf8'
export LC_ADDRESS='en_GB.utf8'
export LC_TELEPHONE='en_GB.utf8'
export LC_MEASUREMENT='en_GB.utf8'
export LC_IDENTIFICATION='en_GB.utf8'

.bashd/alias

# -*- mode: sh; -*-
                              
function delalias
{
    if alias $1 >& /dev/null ; then
        unalias $1
    fi
}
                                                
alias cdc="cd .."
alias cdcc="cd ../.."
alias cdccc="cd ../../.."
alias cdcccc="cd ../../../.."
alias cdd="cd -"
alias cp="cp -vir"
alias cursor='echo "[?25h"'
alias df='df -h'
alias dfcolour="sed -e 's//^[/g' -e 's/\(^-.*\)/\1/' -e 's/\(^\+.*\)/\1/' -e 's/\(^@.*\)/\1/' -e 's/\(^Index.*\)/\1/' -e 's/\(^=.*\)/\1/' -e 's/\(^diff.*\)/\1/'"
alias dir="echo \'Tis not windows, you bastard\!"
alias downcase='ren d'
alias e='${EDITOR}'
alias ID3reset='eyeD3 --remove-all'
alias ID3tov2.4='eyeD3 --to-v2.4'
alias feh='feh -g+1280+0 -^ "%n [%u of %l] - %wx%h %S %t %z" -.'
alias fortune='fortune -a'
alias free='free -m'
alias gloves='gloves -topr'
alias gqview='echo you mean geeqie'
alias grep='egrep --color'
alias h='history'
alias hexdump='hexdump -C'
alias jobs='jobs -l'
alias journal='$EDITOR ~/.journal/index.org'
alias less='less -R'
alias ls="ls -al --color=always"
alias more='more -f'
alias mplayer='mplayer -geometry +1280+0'
alias mv="mv -vi"
alias ps='ps -FH'
alias purify='ren p'
alias rm='rm -vI'
alias refresh='source ~/.bashrc'
alias rename='ren r'
alias renmul='ren i'
alias rsync='rsync -avz'
alias screen='screen -DR'
alias upcase='ren u'
alias vi="vim"
alias zl="unzip -l"

function mkcd()
{
    mkdir $1 && cd $1
}

function _
{
    ( "$@" & ) >& /dev/null
}

function diff
{
    /usr/bin/diff -du "$@" | dfcolour | $PAGER
}

function rr
{
    $@ `recent`
}

function rndls
{
    /bin/ls -1 $1 | shuf
}

function viewman
{
    nroff -man $1 | $PAGER
}

.bashd/settings

# -*- mode: sh; -*-

PS1='\n\[\e[22;34m\]<\D{%a %d %b %Y %H:%M:%S}> \[\e[35m\]<$?> \[\e[31m\]<`tty | sed -e s:/dev/::`> \[\e[34m\]<\u@\h>\[\e[m\]\n\[\e[1;32m\]==> \w >\[\e[m\] '
PS2='\[\e[1;32m\]-->\[\e[m\] '

bind 'set colored-completion-prefix on'
bind 'set colored-stats on'
bind 'set completion-query-items 100000'
bind 'set page-completions off'
bind 'set show-all-if-ambiguous on'
bind 'set show-all-if-unmodified on'

shopt -u dotglob