CnUnix

[알림판목록 I] [알림판목록 II] [글목록][이 전][다 음]
[ CnUnix ] in KIDS
글 쓴 이(By): mtchoi (Choi, M.T.)
날 짜 (Date): 1995년05월12일(금) 22시49분24초 KST
제 목(Title): .tcshrc 의 예 posting



 tcsh 을 사용하는 user 들을 위해 .tcshrc 의 예를 posting 합니다. 
 tcsh 이 가지고 있는, 제가 잘 모르던 기능들을 알 수 있어 유용했던 
 High Energy Physics group 에서 제안한 proto-type example 입니다. 
 구미에 맞게 조정하시길...

 요청이 있으면 다른  shell 에 대해서도 posting 하죠...

 ==================================================================
 
#################################################################
# UNIX system /etc/tcshrc for tcsh users                        #
# This is the DESY version for AIX,ConvexOS,DomainOS, HP-UX,    #
# IRIX, SunOS and ULTRIX                                        #
# The commands in this file are executed each time a new        #
# interactive tcsh shell is started .                           #
# Authors: DESY UNIX Group                                      #
# Mail: dux@ifh.de                                              #
# Version 2.4     ; last change 17.06.94                        #
#################################################################

set filec                       # Command-completion on

# extract these extensions only on the second level
set fignore = ( .o .dvi .aux .toc .lot .lof .log .blg .bbl .bak .BAK \
.sav .old .trace )

set autolist=on
set listjobs=long
set showdots=on

set lcd = ( )  #  add parents of frequently used directories
set cdpath = (. .. ~ ~/bin ~/src $lcd)

set noclobber               #  '>' do not overwrite
set ignoreeof
set notify
set savehist=40
set history=100 
set histfile=~/.history.$HOST
set time=100

# aliases to bind keys in tcsh

if ($?tcsh) then
    if ($tcsh != 1) then
    set rev=$tcsh:r
set rel=$rev:e
set pat=$tcsh:e
set rev=$rev:r
    endif
    if ($rev > 5 && $rel > 1) then
set complete=1
    endif
    unset rev rel pat
endif

bindkey ^[[1~  exchange-point-and-mark
bindkey ^[[2~  overwrite-mode
bindkey ^[[3~  delete-char-or-list
bindkey ^[[4~  set-mark-command
bindkey ^[[5~  history-search-backward
bindkey ^[[6~  history-search-forward
if ($?complete) then

#
# $Id: complete.tcsh,v 1.10 1992/05/15 22:53:51 christos Exp $
# example file using the new completion code
#
    set noglob
    complete cd   p/1/d/ # Directories only
    complete rmdir  p/1/d/
    complete man  p/1/c/ # only commands
    complete which  p/1/c/
    complete where  p/1/c/
    complete set 'c/*=/f/' 'p/1/s/=' 'n/=/f/'
    complete unset p/1/s/
    complete setenv  p/1/e/ # only environment variables 
    complete unsetenv  p/1/e/
    complete xdvi  n/*/f:*.dvi/ # Only files that match *.dvi
    complete dvips  n/*/f:*.dvi/
    complete latex  n/*/f:*.tex/
    complete tex  n/*/f:*.tex/
    complete vi  n/*/f:^*.o/
    complete zcat n/*/f:*.*[Z,z]/
    complete talk p/1/'`users | tr " " "\012" | uniq`'/ \
  n/*/\`who\ \|\ grep\ \$:1\ \|\ awk\ \'\{\ print\ \$2\ \}\'\`/
    unset noglob

endif

bindkey '^[Ol'   kill-line
bindkey '^[Om'   yank
bindkey '^[On'   set-mark-command
bindkey '^[Op'   exchange-point-and-mark
bindkey '^[Oq'   forward-word
bindkey '^[Or'   spell-line
bindkey '^[Os'   copy-prev-word
bindkey '^[Ot'   beginning-of-line
bindkey '^[Ou'   which-command
bindkey '^[Ov'   end-of-line
bindkey '^[Ow'   backward-word
bindkey '^[Ox'   yank
bindkey '^[Oy'   kill-region


alias ff      "find . -name \!^ -print"

alias nman      'nroff -man \!* | $PAGER'

alias rs        'set noglob;eval `resize`;unset noglob'

if ( $SYSTYPE =~ bsd* ) then
        alias pp       'ps -aux | egrep '\''PID|\!*'\'' | grep -v grep'
        alias ll        'ls -lgA'
else
        alias pp       'ps -ef | egrep '\''PID|\!*'\'' | grep -v grep'
        alias ll        'ls -lA'
endif

alias pwd 'echo $cwd'

if ( $?YP ) then
 if ( $YP == "YES" ) then
        alias passwd yppasswd
 endif
endif

if ( -r $ETC/local/aliases.csh )  then
  source $ETC/local/aliases.csh
endif

[알림판목록 I] [알림판목록 II] [글 목록][이 전][다 음]
키 즈 는 열 린 사 람 들 의 모 임 입 니 다.