blog.fuktommy.com

僕も.zshrcを公開

.zshrcを公開 - Hatena::Diary::Ubuntu」見て公開しようと思って忘れてた。 SunOSの.cshrc(tcsh用)のものを FreeBSDの.cshrc, RedHatの.bashrc, Debianの.zshrc等々と使い回してきて、 今のはCygwin用です。

#
# ~/.zshrc
#

setopt NOCLOBBER
setopt INTERACTIVE_COMMENTS
setopt APPEND_HISTORY
setopt NOHUP
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt NO_BG_NICE
unsetopt NOMATCH

if [ -n "$CYGTERM" -o "$TERM" = emacs ]; then
    PATH="/usr/local/sbin:/usr/sbin:/sbin:$PATH"
    PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:$PATH"
fi
PATH="$HOME/bin:$PATH"

export PAGER="lv -Os -c"
export VISUAL=vi
export PERL5LIB=${HOME}/lib/perl
export PYTHONPATH=$HOME/lib/python
export HTTP_HOME=${HOME}/.w3m/bookmark.html
export CCACHE_DIR=/cygdrive/d/cache/ccache
export TMP=/tmp
export TMPDIR=/tmp

bindkey -e
alias ls="ls -F"
alias cp="cp -i"
alias mv="mv -i"
alias rm="rm -i"
xpwd () { echo -ne "\033]0;${HOST}: `pwd | sed "s|$HOME|~|"`\007" }

[ -e "${HOME}/.zalias" ] && . "${HOME}/.zalias"
[ -e "${HOME}/.ssh/agent-env" ] && . "${HOME}/.ssh/agent-env"
#limit coredumpsize 0
umask 022

HISTSIZE=2000
SAVEHIST=1000
HISTFILE=$HOME/.zhistory
#MAILPATH="${HOME}/Mail/procmail/new/"

if [ "$TERM" = emacs ]; then
    PS1='%m:%~%# '
elif [ -n "$PS1" ]; then
    stty -ixon
    PS1='%m:%~%# '
    chpwd () { xpwd }
    xpwd
fi

if [ -n "$CYGTERM" -a -n "$PS1" ]; then
    cd $HOME
fi
setopt AUTO_PUSHD
#
# ~/.zalias
#
alias   ls='/bin/ls -F --show-control-chars'
alias   ll='ls -lh'
alias   rm='/bin/rm -i'
alias   cp='/bin/cp -ip'
alias   mv='/bin/mv -i'
alias	md='/bin/mkdir'
alias	rd='/bin/rmdir'
alias	px='/bin/ps x'
alias	tgz='tar zcvf'
alias	untgz='tar zxvf'
alias	w='w3m'
alias	lv='lv -Os -c'
alias	df='df -h'
alias	du='du -h'
alias	j='jobs'
alias	getout='wget -O - -q -Y off'
alias	getimg='egrep -i  "jpg|jpeg|gif|png|zip|lzh|mpg"'
alias	getdoc='egrep -iv "jpg|jpeg|gif|png|zip|lzh|mpg"'
alias	mget='wget -nv --random-wait --header="Accept-Encoding: gzip, compres, bzip, bzip2" --header="Accept-Language: ja; q=1.0, en;q=0.5" -U "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" -w 2'
alias	today='date +%Y-%m-%d'
alias   host='nslookup'
alias   ssh-start='ssh-start && . ~/.ssh/agent-env'
alias	pd='popd'

title	() { echo -ne "\033]0;$*\007" }
mcd	() { mkdir -p $1 ; cd $1 }
rcd	() { local d=`pwd`; cd ..; rmdir "$d" }
all-backup () { ssh-start ; twitter-backup ; fetchmail ; sakura-backup }
twitter-backup () { pushd $HOME/bin && /cygdrive/c/Python25/python.exe ./twitter-backup -o ../backup/twitter.db fuktommy ; popd }
twitter-log () { echo "select * from twitterlog order by pubdate desc;" | sqlite3 ~/backup/twitter.db|nkf -We|w -Ie }
Copyright© 1998-2014 Fuktommy. All Rights Reserved.
webmaster@fuktommy.com (Legal Notices)