- .cshrcファイルを編集
# vi ~/.cshrc
- 変更前
vi .cshrc.org
# $FreeBSD: src/etc/root/dot.cshrc,v 1.30.10.1.6.1 2010/12/21 17:09:25 kensmith Exp $
#
# .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)
setenv EDITOR vi
setenv PAGER more
setenv BLOCKSIZE K
if ($?prompt) then
# An interactive shell -- set some stuff up
set prompt = "`/bin/hostname -s`# "
set filec
set history = 100
set savehist = 100
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
- 変更後
# $FreeBSD: src/etc/root/dot.cshrc,v 1.30.10.1.6.1 2010/12/21 17:09:25 kensmith Exp $
#
# .cshrc - csh resource script, read at beginning of execution by each shell
#
# see also csh(1), environ(7).
#
### ALIAS ###
alias h history 32
alias j jobs -l
alias la ls -a
alias lf ls -FA
alias ll ls -lAoh
### OPTIONS ###
# A righteous umask
umask 22
### PATH ###
set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin)
### ENVIRONMENT ###
setenv EDITOR vi
setenv PAGER more
setenv BLOCKSIZE K
# lsコマンドをカラー表示に変更
setenv CLICOLOR 1
setenv LSCOLORS GxFxDxDxhxDgDxabagacad
#setenv LSCOLORS exfxcxdxbxegedabagacad
### PROMPT ###
if ($?prompt) then
# An interactive shell -- set some stuff up
# プロンプトの設定
# %n : ユーザ名
# %m : マシン名
# %c : カレントディレクトリ
# %# : スーパーユーザは「#」一般ユーザは「>」で表示
set prompt='%{\033[36m%n@%m %c%#\033[00m%} '
# 「Esc」キーでファイル名の補完を行う
set filec
# ヒストリに保存するコマンド
set history = 10000
# 「~/.history」に保存するコマンド(マージする)
set savehist = (10000 merge)
set mail = (/var/mail/$USER)
if ( $?tcsh ) then
# 入力行と一致するヒストリは削除
set histdup = erase
# TAB補完でもカラー表示
set color
# ファイル名の補完で複数の候補が有る場合、一覧を表示する
set autolist
# ヒストリにサーチ機能を付加
bindkey "^W" backward-delete-word
bindkey -k up history-search-backward
bindkey -k down history-search-forward
# [Ctrl] + [D]でログアウトしない
set ignoreeof
# cdコマンドの補完ではディレクトリのみを対象にする
complete cd 'p/1/d/'
endif
endif
### TERM ###
# タイトルバーの設定
if( $?TERM )then
switch( $TERM )
case xterm:
case kterm:
case dtterm:
alias precmd 'printf "\033]2;${HOST}\007"' # \033]2; と \007 の間の部分がタイトルバーに表示される
breaksw
case screen:
set pcmd=`procstat -ch $$ | awk '{print $2}'`
set ppid=`procstat -h $$ | awk '{print $2}'`
while ( ! "0" == "${ppid}" )
if ( "jfbterm" == "${pcmd}" ) then
TERM=jfbterm-color
break
endif
set pcmd=`procstat -ch "${ppid}" | awk '{print $2}'`
set ppid=`procstat -h "${ppid}" | awk '{print $2}'`
end
unset pcmd ppid
breaksw
endsw
endif
- diff
# diff -y ~/.cshrc ~/.cshrc.org
# $FreeBSD: src/etc/root/dot.cshrc,v 1.30.10.1.6.1 2010/12/21 # $FreeBSD: src/etc/root/dot.cshrc,v 1.30.10.1.6.1 2010/12/21
# #
# .cshrc - csh resource script, read at beginning of executio # .cshrc - csh resource script, read at beginning of executio
# #
# see also csh(1), environ(7). # see also csh(1), environ(7).
# #
### ALIAS ### | alias h history 25
alias h history 32 <
alias j jobs -l alias j jobs -l
alias la ls -a alias la ls -a
alias lf ls -FA alias lf ls -FA
alias ll ls -lAoh | alias ll ls -lA
### OPTIONS ### <
# A righteous umask # A righteous umask
umask 22 umask 22
### PATH ### <
set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/loc set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/loc
### ENVIRONMENT ### | setenv EDITOR vi
setenv EDITOR vi | setenv PAGER more
setenv PAGER more <
setenv BLOCKSIZE K setenv BLOCKSIZE K
# lsコマンドをカラー表示に変更 <
setenv CLICOLOR 1 <
setenv LSCOLORS GxFxDxDxhxDgDxabagacad <
#setenv LSCOLORS exfxcxdxbxegedabagacad <
### PROMPT ### <
if ($?prompt) then if ($?prompt) then
# An interactive shell -- set some stuff up # An interactive shell -- set some stuff up
# プロンプトの設定 | set prompt = "`/bin/hostname -s`# "
# %n : ユーザ名 <
# %m : マシン名 <
# %c : カレントディレクトリ <
# %# : スーパーユーザは「#」一般ユーザは「>」で表示 <
set prompt='%{\033[36m%n@%m %c%#\033[00m%} ' <
# 「Esc」キーでファイル名の補完を行う <
set filec set filec
# ヒストリに保存するコマンド | set history = 100
set history = 10000 | set savehist = 100
# 「~/.history」に保存するコマンド(マージする) <
set savehist = (10000 merge) <
set mail = (/var/mail/$USER) set mail = (/var/mail/$USER)
if ( $?tcsh ) then if ( $?tcsh ) then
# 入力行と一致するヒストリは削除 <
set histdup = erase <
# TAB補完でもカラー表示 <
set color <
# ファイル名の補完で複数の候補が有る場合、一覧を表示する <
set autolist <
# ヒストリにサーチ機能を付加 <
bindkey "^W" backward-delete-word bindkey "^W" backward-delete-word
bindkey -k up history-search-backward bindkey -k up history-search-backward
bindkey -k down history-search-forward bindkey -k down history-search-forward
# [Ctrl] + [D]でログアウトしない <
set ignoreeof <
# cdコマンドの補完ではディレクトリのみを対象にする <
complete cd 'p/1/d/' <
endif endif
endif endif
<
### TERM ### <
# タイトルバーの設定 <
if( $?TERM )then <
switch( $TERM ) <
case xterm: <
case kterm: <
case dtterm: <
alias precmd 'printf "\033]2;${HOST}\007"' # \033]2; <
breaksw <
case screen: <
set pcmd=`procstat -ch $$ | awk '{print $2}'` <
set ppid=`procstat -h $$ | awk '{print $2}'` <
while ( ! "0" == "${ppid}" ) <
if ( "jfbterm" == "${pcmd}" ) then <
TERM=jfbterm-color <
break <
endif <
set pcmd=`procstat -ch "${ppid}" | awk '{print $2 <
set ppid=`procstat -h "${ppid}" | awk '{print $2} <
end <
unset pcmd ppid <
breaksw <
endsw <
endif <