# Blair's aliases
#
# Alias for prompt is in .tcshrc, all others below.

# File management/System calls
alias fw 'find . -name '\!1' -print | xargs grep -n '\!2' /dev/null'
alias mntc 'mount /cdrom'
alias lsa 'ls -a'
alias lsl 'ls -l'
alias lsal 'ls -al'
alias lsla 'ls -al'
alias lal 'ls -al'
alias xterm 'xterm \!* -sb -sl 1000&'
alias lm 'ls | more'
#change file to executable
alias chx 'chmod a+x $*'
# list directories
alias lsdir 'ls -l | grep ^d | more'
alias ls 'ls -F'

# Program Shortcuts
if (($HOSTNAME == "stat007.stat.rice.edu") || ($HOSTNAME == "stat0.stat.rice.edu")) then
  alias p8 'lpr -Pdh2088-duplex \!*'
  alias p3 'lpr -Pdh2093-duplex \!*'
endif

if ($OS == "linux") then
  alias mat octave
  alias sp  R
  alias pico 'nano'
  alias xterm 'xterm \!* -sb -sl 1000&'
  alias mntc 'mount /cdrom'
  alias clean '/bin/rm -f *~ *.o *.log *.aux *.dvi #*# core a.out'
  alias burn 'clean; /bin/rm -f  *.ps *.pdf *.x'
  alias rmd '/bin/rm -rf \!*'
else if ($OS == "solaris") then
  alias mat matlab
  alias sp Splus
  alias sas 'sas &'
  alias acro 'acroread \!* &'
  alias soffice '/opt/site/staroffice-5.2/sunos5/bin/soffice'
  alias xmaple 'xmaple &'
  alias clean '/usr/bin/rm -f *~ *.o *.log *.aux *.dvi #*# core a.out'
  alias burn 'clean; /usr/bin/rm -f  *.ps *.pdf *.x'
  alias rmd '/usr/bin/rm -rf \!*'
endif

alias gh 'ghostview \!* & '
alias em 'emacs -bg black -fg white \!* &'
alias xbiff 'xbiff &'
alias netscape 'netscape &'
alias lm 'ls | more'
alias emacs 'emacs -bg black -fg white \!* &'

# SSH/SFTP shortcuts
alias shj 'ssh jungle.owlnet.rice.edu'
alias ftpj 'sftp jungle.owlnet.rice.edu'

alias shk 'ssh kennel.ruf.rice.edu'
alias ftpk 'sftp kennel.ruf.rice.edu'
alias shv 'ssh vet.ruf.rice.edu'
alias ftpv 'sftp vet.ruf.rice.edu'

alias sh0 'ssh stat0.stat.rice.edu'
alias ftp0 'sftp stat0.stat.rice.edu'
alias sh7 'ssh stat007.stat.rice.edu'
alias ftp7 'sftp stat007.stat.rice.edu'
alias shm 'ssh marley.stat.rice.edu'
alias ftpm 'sftp marley.stat.rice.edu'
alias shb 'ssh bp6.stat.rice.edu'
alias ftpb 'sftp bp6.stat.rice.edu'

alias shh 'ssh harvey.caam.rice.edu'
alias ftph 'sftp harvey.caam.rice.edu'
alias shf 'ssh flux.caam.rice.edu'
alias ftpf 'sftp flux.caam.rice.edu'


# Goto direcetory aliases
alias s542 'cd ~/STAT542'
alias c420 'cd ~/CAAM420'


# More aliases from Hsi-Guang:
#  back - go to previous directory.
alias back 'set xx=$DS[$#DS] DS[$#DS]=$cwd; chdir $xx; unset xx; setprompt;'
#  go # - go to directory item number #
alias go   'set xx=$DS[\!*] DS[\!*]=$cwd; chdir $xx; unset xx;\\
            setenv HERE `pwd`; setprompt;'
#  ds   - display2s directory stack (set to length DSSIZE below).
alias ds   'echo $DS | tr " " "\012" | cat -n'
#  cd   - stack current directory and go to a new one.  Oldest directories
#         fall off end of stack (whose size is DSSIZE).
alias cd   'if ($#DS >= $DSSIZE) shift DS; set DS = ($DS $cwd);\\
            chdir \!*;  setenv HERE `pwd`; setprompt;'