# .cshrc file ---- Cshell run control file.
#
# initial setup file for both interactive and noninteractive C-Shells
#
# Only add commands between the "### Begin" and "### End" lines of this file.

#       set up search path and local environment
if ! $?LOCALENV then
  source /opt/proto/localenv
  setenv LOCALENV
endif

### Begin  - Commands for all shells
set noclobber
limit coredumpsize 0
umask 077
alias la           'ls -a'
alias ll           'ls -la'
alias lf           'ls -F'
alias lr           'ls -lR'
### End  - Commands for all shells

#       local commands that are needed for environment set in localenv
if -r $HOME/.localalias source $HOME/.localalias

#       skip remaining setup if not an interactive shell
if ($?USER == 0 || $?term == 0 || $?prompt == 0 ) exit

if $?TITLEBAR then 
  source $TITLEBAR 
endif

### Begin  - Commands for interactive shells
set history=40
set ignoreeof
alias cp            'cp -i'
alias mv            'mv -i'
alias rm            'rm -i'
### End  - Commands for interactive shells

if -r $HOME/.alias source $HOME/.alias
 
### Project specific .cshrc  - Set current project and source its file
if -r /opt/proto/cshrc-project source /opt/proto/cshrc-project

# 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
