#!/bin/tcsh # # Work in progress ;) # Made by paulius@kaktusas.org # alias ls '/bin/ls -F' alias ll '/bin/ls -l' alias la '/bin/ls -a' switch (`uname -s`) case 'FreeBSD': set path = (/usr/local/bin /usr/bin /bin /usr/local/sbin /usr/sbin /sbin /usr/X11R6/bin $HOME/bin) setenv BLOCKSIZE K complete pkg_info 'p/*/`pkg_info | awk \{print\ \$1\}`/' complete pkg_delete 'p/*/`pkg_info | awk \{print\ \$1\}`/' breaksw case 'OpenBSD': set path = (/usr/local/bin /usr/bin /bin /usr/local/sbin /usr/sbin /sbin) setenv PATH /usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin breaksw case 'SunOS': set path = (/bin /usr/sbin /usr/ccs/bin /sbin /usr/sfw/bin) setenv TERM xterms breaksw default: endsw if ( -x `which perl` ) then alias password "perl -le 'print map { (a..z,A..Z,0..9)[rand 62] } 0..pop' 7" alias unixtime perl -e 'printf\("%ld",time\(\)\);' endif if ( -x `which less` ) then setenv PAGER less setenv LESS "-eFgiX" else setenv PAGER more endif setenv EDITOR vi set promptchars='>#' switch ($?TERM) case "xterm*": set prompt="%{\033]0;%n@%M\007%}%B%n@%m%b:%c03%# " breaksw default: set prompt="%B%n@%m%b:%c03%# " breaksw endsw set ellipsis unset histfile set autolist set autocorrect set autoexpand set autologout=0 set complete set correct=cmd set symlinks=chase unset listjobs set printexitvalue set rmstar set fignore=(.o .orig \~) set pushdsilent set hosts=( 127.0.0.1 ) # you should really define this in .tcshrc.local complete cd p/1/d/ complete pushd p/1/d/ complete rmdir p/1/d/ complete ssh p/\*/\$hosts/ complete sftp p/\*/\$hosts/ complete man p/\*/c/ bindkey "^W" backward-delete-word bindkey -k up history-search-backward bindkey -k down history-search-forward alias nice '/usr/bin/nice' alias which '/usr/bin/which' if ( -r ~/.tcshrc.local ) source ~/.tcshrc.local