Top > FreeBSD > zsh-4.2.0
zsh を安定版(20040319)の 4.2.0 に入れ換え。あまり使いこなせてないけど。
個人的には、perldoc [TAB] でモジュール名が出てきたり、補完が充実しているのが嬉しいところ。
tcsh を使っていたときは、perlmodlist.pl でリストを作成して、
complete perldoc 'C@[./]*@f@' 'n@*@`cat $HOME/.perlmodules`@'
とかしてました。
■2004/06/27 ~/.zshrc
# zshrc - zsh start up script for interactive shells
#
# ref. http://zsh.sunsite.dk/Doc/
#
##
## autoload
##
# color prompt
autoload -U colors
colors
# completions
autoload -U compinit
compinit
##
## shell variables
##
# history
SAVEHIST=6000
HISTSIZE=6000
HISTFILE=~/.zhistory
# prompt
#PS1='[%n@%m:%~]%# '
PS1='[%m:%~] %n%# '
#PS1="[%n@%m.%T:%~]%# "
#PS1="[%n@%m.%{${fg[blue]}%}%T%{${fg[black]}%}:%~]%# "
RPS1='(%w %t)'
SPROMPT="correct> %R -> %r [nyae]? "
MAILPATH="/var/mail/$USER?${fg[red]}You have new mail."
MAILCHECK=20
DIRSTACKSIZE=4
fignore=(.o .aux .bak .log .core \~)
#cdpath=(~)
##
## setopt
##
# Don't exit on end-of-file.
setopt IGNORE_EOF
# Don't allow > redirection to truncate existing file.
# setopt NO_CLOBBER
# Try to correct the spelling of commands.
setopt CORRECT
# Try to correct the spelling of all arguments in a line.
#setopt CORRECT_ALL
# Save beginning and ending timestamps to the history file.
setopt EXTENDED_HISTORY
# Share histories
setopt SHARE_HISTORY
# No duplicate
setopt HIST_IGNORE_ALL_DUPS
# Remove superfluous blanks from each command line.
setopt HIST_REDUCE_BLANKS
# Remove the history command from the history list.
setopt HIST_NO_STORE
# Remove command lines from the history list when the first character on the line is a space.
setopt HIST_IGNORE_SPACE
# Make cd push the old directory onto the directory stack.
setopt AUTO_PUSHD
# Don't push multiple copies of the same directory onto the directory stack.
setopt PUSHD_IGNORE_DUPS
# Print eight bit characters literally in completion lists, etc.
setopt PRINT_EIGHT_BIT
# Do not query the user before executing `rm *' or `rm path/*'.
setopt RM_STAR_SILENT
# Sort the filenames numerically rather than lexicographically.
setopt NUMERIC_GLOB_SORT
##
## zstyle
##
#zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
##
## aliases
##
if [ -x /usr/local/bin/gnuls ]; then
alias la='/usr/local/bin/gnuls -a -F --color'
alias ls='/usr/local/bin/gnuls -F --color'
alias ll='/usr/local/bin/gnuls -l -A --color'
alias lld='/usr/local/bin/gnuls -l -A -d --color'
alias l='/usr/local/bin/gnuls -F --color'
else
alias la='ls -Fa'
alias ls='ls -F'
alias ll='ls -lA'
alias lld='ls -lAd'
alias l='ls -F'
fi
alias a='alias'
alias h='history -r 10'
alias j='jobs -l'
alias su='/usr/bin/su -'
alias so='source ~/.zshrc'
alias sv='vi ~/.zshrc'
alias patch='patch -N'
alias pd='pushd -v'
alias dirs='dirs -v'
alias back='cd $OLDPWD'
alias Xo='xrdb -load ~/.Xresources'
alias patch='patch -N'
alias pd='pushd -v'
alias dir='dirs -v | sed -n -e "/^[^0].*/s/\(^[0-9]\)/ [\1]/p"'
alias dirs='dirs -v'
alias sman='cat \!* | /usr/bin/tbl | /usr/local/bin/groff -Tnippon -man | /usr/local/bin/jless'
alias eman='cat \!* | /usr/bin/tbl | /usr/bin/nroff -man | /usr/local/bin/jless'
alias rmbak='ls *.bak ; rm *.bak'
alias rmbak.='ls .*.bak ; rm .*.bak'
alias rmcore='ls *.core ; rm *.core'
alias lse='ls *\~ .*\~'
alias rme='ls *\~ ; rm *\~'
alias rme.='ls .*\~ ; rm .*\~'
alias beep="echo -n '^G' # ^G is C-v C-g
alias bytecom='emacs -batch -f batch-byte-compile \!*'
alias setD='setenv DISPLAY \!*\:0.0; env | grep DISPLAY'
alias pkg_info='/usr/sbin/pkg_info'
alias md5='/sbin/md5'
alias pkg_list='pkg_info -aI | jless'
[ -n "`alias run-help`" ] && unalias run-help
autoload run-help
##
## keybind
##
bindkey -e
autoload history-search-end
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end
bindkey "^P" history-beginning-search-backward-end
bindkey "^N" history-beginning-search-forward-end
##
## watch
##
watch=(notme)
LOGCHECK=20
WATCHFMT="%(a:${fg[blue]}%n has %a tty%l from %M at %t.:${fg[red]}%n has %a from %M at %t.)"
##
## function
##
chpwd () {
[[ -t 1 ]] || return
case $TERM in
(*xterm*|rxvt|(dt|k|E)term) print -Pn "\e]2;[tty%l] %n\@%m:%~\a"
;;
esac
}
##
## End of zshrc
##
2004/06/27 11:28
Bulkfeeds で関連記事検索
Bulkfeeds で関連記事検索
TrackBack(0)
TrackBack URL for this entry: http://www.asmate.net/mt/mt-tb.cgi/74
コメントする
