# $FreeBSD: releng/9.0/etc/root/dot.cshrc 170088 2007-05-29 06:37:58Z dougb $
#
# .cshrc - csh resource script, read at beginning of execution by each shell
#
# see also csh(1), environ(7).
#

alias h		history 25
alias j		jobs -l
alias la	ls -a
alias lf	ls -FA
alias ll	ls -lA

# A righteous umask
umask 22

set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin /tools)

setenv	EDITOR	vim
setenv	PAGER	more
setenv	BLOCKSIZE	K

if ($?prompt) then
	# An interactive shell -- set some stuff up
	set prompt = "`/bin/hostname -s`# "
	set filec
	set histfile = /tmp/.history
	set history = 1000
	set savehist = 1000
	set mail = (/var/mail/$USER)
	if ( $?tcsh ) then
		bindkey "^W" backward-delete-word
		bindkey -k up history-search-backward
		bindkey -k down history-search-forward
	endif
endif

# Quirck to make sure the current interactive session actually has FIB=0
# assigned. When sshd(4) is running under FIB=1 for example, it will default to
# FIB=1. This will make sure the shell behaviour routing wise is like an
# normal client.
if ($?prompt) then
  if (`sysctl -n net.my_fibnum` != 0) then
    echo "# WARN: Multiple routing tables use! Defaulting new shell to FIB=0"
    setfib -0 csh 
    logout
  endif
endif
    
if ($?prompt) then
   [ -x /etc/motd.cshrc ] && source /etc/motd.cshrc
endif
