# -*-shell-script-*-
# JLdL 17Jun04.
#
# Set up a customized color scheme for ls.
if ( $?prompt ) then
    alias ls	ls --color
    alias la	ls -a
    alias ll	ls -l
    alias lla	ls -la
    # The DOS compatibility command.
    alias dir	dir --color
    # Use a custom color scheme for ls.
    set lscl = "no=0:fi=0:di=36:ln=1;34:pi=40;33"
    set lscl = "${lscl}:so=35:bd=40;33:cd=40;33:or=34:ex=32"
    set lscl = "${lscl}:*.tar=31:*.tgz=31:*.arj=31:*.taz=31:*.lzh=31:*.deb=31"
    set lscl = "${lscl}:*.zip=31:*.z=31:*.Z=31:*.gz=31:*.bz=31:*.bz2=31"
    set lscl = "${lscl}:*.jpg=35:*.gif=35:*.bmp=35:*.ppm=35:*.tga=35"
    set lscl = "${lscl}:*.xbm=35:*.xpm=35:*.tif=35:*.mpg=37:*.avi=37"
    set lscl = "${lscl}:*.gl=37:*.dl=37"
    setenv LS_COLORS "$lscl"
    unset lscl
endif
#
# Turn the safety on for file manipulation commands.
alias cp	'cp -i'
alias mv	'mv -i'
alias rm	'rm -i'
#
# Emulate some popular DOS commands.
alias copy	'cp -i'
alias ren	'mv -i'
alias del	'rm -i'
alias cls	clear
alias pwd	'echo $cwd'
alias path	'echo $path'
#
# A few useful editor aliases.
alias e		'emacs -rv -fn 10x20 -geometry 80x36+95+0'
alias es	'emacs -rv -fn 7x14bold -geometry 179x64+0+0'
#
# Configure the behavior of a few more commands.
alias quota	'quota -gv'
alias less	'less -re'
alias finger	'finger -m'
alias dvips	'dvips -o ""'
alias hide	'chmod go-rwx'
#
# Define a few useful combinations of commands.
alias areas	'ls -alFg | egrep "^d"'
alias links	'ls -lF | egrep " \-> "'
alias rs	'eval resize >& /dev/null'
#
# Prevent a common error.
alias mc	echo "To run the Midnight Commander use \\mc \!*"
#
# A command to help set the X11 DISPLAY variable.
alias setdisplay	'source /root/setdisplay'
#
# Set a temporary variable with a double dollar sign.
set twodoll = '$$'
#
# Define a paragraph-oriented grep.
alias pgrep	"agrep -i -t -d '$twodoll' \!*"
#
# A simple way to set up a few handy databases.
alias fax	"agrep -i -t -d '$twodoll' \!* /root/data/faxes"
alias email	"agrep -i -t -d '$twodoll' \!* /root/data/emails"
alias phone	"agrep -i -t -d '$twodoll' \!* /root/data/phones"
alias address	"agrep -i -t -d '$twodoll' \!* /root/data/addresses"
unset twodoll
