krc /.aliases

my .aliases file, which is sourced in my .bashrc
# enable color support of ls 
if [ "$TERM" != "dumb" ]; then
    eval `dircolors -b`
    #alias ls='ls --color=auto'
    alias ls='ls --color=auto --group-directories-first'
fi

# some more ls aliases
alias ll='ls -l'
alias la='ls -a'
alias lv='ls -la'
# sort by reverse time modified
alias lm='ls -latr'

alias clr='clear'

# protection from rogue rm commands
alias rm='rm -i'

# dir size - see the total size of the contents of this dir
alias ds='du --max-depth=1 -h'

# make grep use extended regex by default
alias grep='egrep'

# p for print - print to screen and leave it
alias p='more'

# e for editor - moved to shell script
#alias e='$EDITOR'

# r for read - moved to shell script
#alias r='$PAGER'

# b for browser (CLI, for local html docs)
alias b='elinks'

# make date display YYYY-MM-DD HH:MM
alias week='/bin/date +%V\ %G'
alias date='date +%Y-%m-%d\ %R'

set $TERM to screen when running screen
alias screen='TERM=screen screen'

# pulseaudio wrapper stuff
alias wine='padsp wine'
alias winecfg='padsp winecfg'
#alias vlc='padsp vlc'

# Compress the cd, ls -l series of commands.
function cl ()
{ 
    cd "$@" && ll
}

# moved to shell script
#function moz ()
#{
#    suiterunner --ProfileManager &
#}

#cp with a progress bar, by Chris Lamb
cp_p()
{
   set -e
   strace -q -ewrite cp -- "${1}" "${2}" 2>&1 \
      | awk '{
	    count += $NF
            if (count % 10 == 0) {
               percent = count / total_size * 100
               printf "%3d%% [", percent
               for (i=0;i<=percent;i++)
                  printf "="
               printf ">"
               for (i=percent;i<100;i++)
                  printf " "
               printf "]\r"
            }
         }
         END { print "" }' total_size=$(stat -c '%s' "${1}") count=0
}


#function man
#{
#    vim -c "Man $*" -c "silent! only"
#} 

#function r1 ()
#{
#    filename="$@"
#    ext=${filename##*.}
#
#    if [[ "$ext" =~ *htm* ]]; then
#	elinks $filename
#    else
#	most $filename
#    fi
#}