# # Prototype .tcshrc # 20-Apr-95, BMiller # # Mostly tcsh stuff, should also work fine with csh # tcsh is superior to csh and much more friendly and able to do much more. # Man tcsh for more info (i.e. 'man tcsh') # Checks the OS and arch and sets up the path correctly # Also has some variables, some commented out, that make tcsh more # friendly, most with comments. # setenv OPENWINHOME /usr/openwin # where openwindows is homed # # default path for all OS's, don't call it path so tcsh won't try to open # them multiple times. # # if you add any of you own directories to this be sure to use the /usa or # /usb links instead of any /a mountpoints which may or may not exist. # set dpath = ( /usr/local/{bin,ucb,uci,etc} /usr/{bin,ucb,etc} \ /usr/local/gnu/bin /usr/local/lang /etc ) # comment this section out if you don't need the VLSI tools #setenv EESOF_DIR /usr/local/hpeesof #set dpath = ( $dpath /usr/local/cad/bin /usr/local/spice/bin \ # /usr/local/cadence/tools/bin /usr/local/cadence/tools/dfII/bin \ # $EESOF_DIR/bin ) #setenv EESOF_DIR /usr/local/hpeesof #setenv LM_LICENSE_FILE $EESOF_DIR/licenses/license.dat #setenv CDS_LIC_FILE /usr/local/cadence/share/license/licence.dat if($?MANPATH) then setenv MANPATH ${MANPATH}:/usr/local/cad/man:/usr/share/catman else setenv MANPATH /usr/man:/usr/local/man:/usr/local/X/man:/usr/local/gnu/man:/usr/local/cad/man:/usr/share/catman endif # END VLSI setup # Include correct bin directories for architecture and OS set osname = `/bin/uname -s` # what operating system setenv OSNAME $osname set SUNOS = 0 # will stay 0 if not a sun switch("$OSNAME") case "SunOS": # setenv PAGER less # whatever pager you use # setenv LESS -esMX # used by less # man less for more info, Yes less is superior to more # set karch = `/bin/uname -m` # what kernel architecture (i.e. sun4c, sun4m) setenv KARCH $karch set osrel = `/bin/uname -r` # what OS Release (i.e. 4.1.3 or 2.4) setenv OSREL $osrel set SUNOS = `echo $OSREL | /bin/cut -f1 -d.` #check SunOS version# switch ("$KARCH") case "sun4*": # some Sun4 binaries if ($SUNOS == "5") then # set up things for SunOS 5.x aka Solaris 2.x set path = ( /usr/sbin /opt/SUNWspro/bin /usr/ccs/bin $dpath \ /usr/local/X11R6/bin $OPENWINHOME/bin /usr/local/X/bin /usr/sfw/bin .) alias dir '/bin/ls -lsF \!* | more' else if ($SUNOS == "4" ) then # SunOS4.x set path=( $dpath /usr/local/X/bin \ /usr/local/X11R6/bin $OPENWINHOME/bin /usr/lang .) alias dir '/bin/ls -glsF \!* | more' endif endif set arch = sun4 setenv ARCH sun4 breaksw case "sun3": # some Sun3 binaries # setenv LESS -esM set path=( $dpath /usr/local/X/bin .) alias dir '/bin/ls -glsF \!* | more ' set arch = sun3 setenv ARCH sun3 breaksw case "i86pc": # Solaris x86 set path = ( /usr/sbin /opt/SUNWspro/bin /usr/ccs/bin $dpath \ /usr/local/X11R6/bin $OPENWINHOME/bin /usr/local/X/bin /usr/sfw/bin .) alias dir '/bin/ls -lsF \!* | more' breaksw endsw breaksw case "HP-UX": alias dir '/bin/ls -lsF \!* | more' # setenv LESS -esMX set path = ( /bin $dpath /usr/bin/X11 .) breaksw case "OSF1": set path=( /usr/sbin $dpath /usr/local/X/bin .) # setenv LESS -esMX alias dir '/bin/ls -glsF \!* | more' breaksw case "ULTRIX": set path=( /bin $dpath /usr/bin/X11 .) alias dir '/bin/ls -glsF \!* | more' breaksw case "IRIX": set path=( /usr/sbin /usr/bin/X11 $dpath .) # setenv LESS -esMX alias dir '/bin/ls -lsF \!* | more' breaksw case "IRIX64": set path=( /usr/sbin /usr/bin/X11 $dpath .) # setenv LESS -esMX alias dir '/bin/ls -lsF \!* | more' breaksw case "Linux": set path=( /sbin /bin /usr/bin /usr/sbin /usr/local/bin /usr/bin/X11 $dpath ) setenv MANPATH ${MANPATH}:/usr/local/share/man # setenv LESS -esMX alias dir '/bin/ls -lsF \!* | more' breaksw case *: echo "unknown OS" set path = ($dpath .) breaksw endsw if ($?USER == 0 || $?prompt == 0) exit # interactive stuff below # some aliases alias cp 'cp -i' # prompt before overwriting existing files alias mv 'mv -i' # prompt before overwriting existing files alias rm 'rm -i' # prompt before removing files alias cd.. 'cd ..' alias EXIT exit # in case caps lock gets stuck alias j 'jobs -l' alias ls 'ls -hF' if ($OSNAME == 'Linux') alias ls 'ls -hF --color=auto' alias pman 'nroff -man \!* |less' # show nroff man pages alias xlogin 'xterm -display `xdisplay` -e rlogin \!* &' alias openwin24 '${OPENWINHOME}/bin/openwin -dev /dev/fbs/cgfourteen0 defclass TrueColor defdepth 24 -dpsfileops' if ( -x /usr/local/gnu/bin/tar ) alias gtar '/usr/local/gnu/bin/tar' setenv EDITOR /usr/bin/vi # or whatever editor you use setenv YOUSAID "In article %i %f writes:" setenv ORGANIZATION "University of Delaware, Newark" #setenv SIGNATURE "Your Name Here" #setenv SHELL /bin/tcsh # # Shell Variables # # history, keep that many past commands in history buffer # savehist, save that many past commands in history file # notify, notification when a job changes state # set history=30 savehist=30 notify # ignoreeof, ^D will not exit shell #set ignoreeof # noclobber, > will not overwrite existing files >> needs file to exist set noclobber # # tcsh specific shell variables if ($?tcsh) then # time = #, will display time usage after processes that used more # of cpu # seconds. # #set time = 5 # # time can also take a format string #set time = (5 "User: %Uu Kernel: %Su Time: %E % CPU: %P (%Kk/%Mk) %I+%Oio" ) # correct = cmd, will correct spelling mistakes of commands # correct = all, will correct any spelling mistake (annoying when using mv) # autoexpand, will expand history commands (i.e. !vi to expand last command # started with vi) # pushdsilent, will not show dir stack after pushd,popd # pushdtohome, pushd without args will push to ~ # listjobs, will list all jobs when one is suspended like the jobs builtin # listjobs = long, same as above but with long format # set correct=cmd autoexpand listjobs=long # autolist, will show possibilities when a completion fails # autolist = ambiguous, will only show possibilities when a completion adds # no new characters. # on a blank line will run the ls-F builtin # set autolist=ambiguous # fignore, ignore those extensions in completions # set fignore = (.o) # rmstar, prompt for sureness when issueing rm * # Warning: tcsh will prompt, csh will not. Do not rely on this if you turn # it on. set rmstar # # matchbeep, stop a lot of beeping when completing set matchbeep # # printexitvalue, prints exit value if not 0 #set printexitvalue # # watch these users and/or ttys if ( $shlvl == 1 ) then # so won't be in subshells set watch = (1 any console ) endif # # bindkey, what key bindings to use. # vi should be default check $version variable bindkey -v # for vi bindings # bindkey -e # for emacs bindings # makes history searching error bindkey -k up history-search-backward bindkey -k down history-search-forward endif # tcsh shell variables # # default file permissions. # numbers are octal, if the bit is on that bit will be off when file is # created. # umask 027 # I have all permissions, group no write, world nada # # don't want core files do you? # limit coredumpsize 0 # get the prompt right if ($?tcsh) then set prompt="%S%m%s[%h] [%~/]%# " # complete is really cool.... Check tcsh man page for more info # this will only consider directories in cd completions complete cd p/1/d/ # Directories only else # it's csh set prompt="`hostname| sed -e 's/\..*//'`> " endif #hack to get ctrl-l to work setenv TERM xterm-color setenv PAGER less unset dpath