wake
4/25/2014 - 4:55 PM

csh.cshrc

# $FreeBSD: src/etc/csh.cshrc,v 1.3.50.1 2008/10/02 02:57:24 kensmith Exp $
#
# System-wide .cshrc file for csh(1).

# A righteous umask
umask 22

set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/X11R6/bin $HOME/bin)
set path = ($path ~/bin .)

setenv  EDITOR  vi
setenv  PAGER   more
setenv  BLOCKSIZE       K

# turn on autocorrect, autolist, etc..
set filec
set autocorrect
set autolist
set autospell
set autoexpand
set matchbeep = ambiguous
set history = 1000
set savehist=1000
set color
#set notify

# will be notified when someone logs in or out of your system.
set watch = (0 any any)


# set default_dir of GtkFileChooser as $HOME
setenv GTK_DEFAULT_FILECHOOSER_DIR $HOME

# trun on Home End key
bindkey ^[[1~ beginning-of-line
bindkey ^[[4~ end-of-line

# DEL:
bindkey ^[[3~ delete-char

# HOME : go to the beginning of the line.
# already bound to beginnning-of-line, but the keycode thing was different.
bindkey ^[[H beginning-of-line


# END : go to the end of the line.
# same as above.
bindkey ^[[F end-of-line


# PAGE UP : search in history backwards for line beginning as current.
bindkey ^[[I history-search-backward
bindkey ^[[5~ history-search-backward   # for x


# PAGE DOWN : search in history forwards for line beginning as current.
bindkey ^[[G history-search-forward
bindkey ^[[6~ history-search-forward    # for x

# Upadte from Wakefield at 2007.10.05

set path = ($path ~/bin .)

setenv  PAGER   less

# setenv LC_CTYPE en_US.ISO8859-1
# setenv LC_ALL zh_TW.UTF-8
# setenv LANG zh_TW.Big5

# setenv LC_ALL zh_TW.Big5
# setenv LC_CTYPE zh_TW.Big5
# setenv LANG zh_TW.Big5
# setenv MM_CHARSET Big5

# setenv LANG en_US.UTF-8                  //職犑@罈y穡t糧]穢w
# setenv LC_ALL en_US.UTF-8
# setenv LESSCHARSET latin1
# setenv LC_TIME C

# setenv LANG zh_TW.UTF-8
# setenv LC_ALL zh_TW.UTF-8

alias sc        screen
alias sr        screen -r

#alias ls        'gnuls --color --show-control-chars -a'
alias ls        ls --color=tty -aF
alias rm        rm -if
alias h         history 1000
alias j         jobs -l
alias la        ls -a
alias lf        ls -FA
alias ll        ls -lA
alias cls       clear
#alias n         nslookup


#alias whereis   whereis -a

if ( $uid != 0 ) then
  if ( $shell == "/bin/csh" ) then
    set prompt = "`hostname` % "
  else
    if ( ! $?WINDOW ) then
       set prompt = " %{^[[1;33m%}%m%{^[[1;37m%} [%/] %{^[[1;36m%}-%n-%{^[[0;37m%} "
    else
       set prompt = " %{^[[1;33m%}%m%{^[[1;37m%} [%/] %{^[[1;36m%}-%n-%{^[[0;37m%} [W$WINDOW] "
    endif
  endif
else
  if ( $shell == "/bin/csh" ) then
    set prompt = "`hostname` % "
  else
    if ( ! $?WINDOW ) then
       set prompt = " %{^[[1;33m%}%m%{^[[1;37m%} [%/] %{^[[1;36m%}-root-%{^[[0;37m%} "
    else
       set prompt = " %{^[[1;33m%}%m%{^[[1;37m%} [%/] %{^[[1;36m%}-root-%{^[[0;37m%} [W$WINDOW] "
    endif
  endif
endif

cd ~