# ~/.tcshrc - user's tcsh settings

# Do you have personal bin/ directory in your $HOME ?
if ( -d "${HOME}/bin" ) then
  setenv PATH "${PATH}:${HOME}/bin"
endif

# Some people don't like translations to their languages
# setenv LC_MESSAGES "C"

# Many people like these aliases; do you?
alias bc 'bc -lq'
alias hd 'hexdump -C'
alias psg 'ps wax | grep -v grep | egrep -i'
alias psl 'ps wax | less'
alias rs 'rsync -PHax'
#alias tcpdump 'tcpdump -enlvvx -s 4096'
alias tcpdump 'tcpdump -enlvvA -s 4096'

if ($?prompt) then
  # some non-trivial examples of completion
  # man pages; may be slow
  set man_pages=`find /usr/share/man -type f \
  | sed -nre 's,.*/,,g;s,\.(gz|bz2|xz)$,,g;/\.[0-9]$/{s,\.[0-9]$,,g;p}' \
  | sort | uniq`
  complete man 'n/*/$man_pages/'
  # ssh completion for known hosts
  if ( -s ~/.ssh/known_hosts ) then
    set ssh_known_hosts = \
      `cat ~/.ssh/known_hosts | sed -re 's, .*,,g;s/,/\n/g;' | sort | uniq`
    complete ssh 'n/*/$ssh_known_hosts/'
  endif
endif
