|
Revision 20644, 1.3 kB
(checked in by shunirr, 5 years ago)
|
|
dotfiles/zsh/shunirr-zshrc
|
| Line | |
|---|
| 1 | autoload -U compinit |
|---|
| 2 | compinit |
|---|
| 3 | |
|---|
| 4 | export LANG=ja_JP.UTF-8 |
|---|
| 5 | export PATH="/Applications/Adobe Flex Builder 3/sdks/3.1.0/bin":/opt/local/bin:/opt/local/sbin:/sw/bin:$PATH |
|---|
| 6 | export MANPATH=/opt/local/man:$MANPATH |
|---|
| 7 | export EDITOR=vi |
|---|
| 8 | export PAGER='lv -c' |
|---|
| 9 | export _JAVA_OPTIONS=-Duser.language=en |
|---|
| 10 | |
|---|
| 11 | alias ls='ls -hFG' |
|---|
| 12 | alias ll='ls -hlFG' |
|---|
| 13 | alias la='ls -ahFG' |
|---|
| 14 | alias lla='ls -ahlFG' |
|---|
| 15 | alias ps='ps' |
|---|
| 16 | alias ks=ls |
|---|
| 17 | alias sk=ls |
|---|
| 18 | alias sl=ls |
|---|
| 19 | |
|---|
| 20 | PROMPT="%m:%n%% " |
|---|
| 21 | RPROMPT="[%~]" |
|---|
| 22 | |
|---|
| 23 | bindkey -e |
|---|
| 24 | |
|---|
| 25 | setopt auto_remove_slash |
|---|
| 26 | setopt hist_ignore_dups |
|---|
| 27 | setopt prompt_subst |
|---|
| 28 | setopt no_beep |
|---|
| 29 | setopt auto_cd |
|---|
| 30 | |
|---|
| 31 | function chpwd() { ls } |
|---|
| 32 | function ssh_screen() { |
|---|
| 33 | screen -X title $1 |
|---|
| 34 | ssh $1 |
|---|
| 35 | } |
|---|
| 36 | |
|---|
| 37 | # GNU Screen AutoStart |
|---|
| 38 | case "${TERM}" in |
|---|
| 39 | *xterm*|rxvt|(dt|k|E)term) |
|---|
| 40 | exec screen -U -D -RR |
|---|
| 41 | ;; |
|---|
| 42 | esac |
|---|
| 43 | |
|---|
| 44 | if [ `expr $TERM : screen` ]; then |
|---|
| 45 | alias ssh ssh_screen |
|---|
| 46 | precmd() { |
|---|
| 47 | screen -X title $(basename `echo $PWD | sed -e "s/ /_/g"`) |
|---|
| 48 | } |
|---|
| 49 | preexec() { |
|---|
| 50 | screen -X title `echo $1 | cut -d " " -f 1` |
|---|
| 51 | } |
|---|
| 52 | fi |
|---|
| 53 | |
|---|
| 54 | # History |
|---|
| 55 | autoload history-search-end |
|---|
| 56 | zle -N history-beginning-search-backward-end history-search-end |
|---|
| 57 | zle -N history-beginning-search-forward-end history-search-end |
|---|
| 58 | bindkey "^P" history-beginning-search-backward-end |
|---|
| 59 | bindkey "^N" history-beginning-search-forward-end |
|---|
| 60 | |
|---|
| 61 | setopt share_history |
|---|
| 62 | setopt extended_history |
|---|
| 63 | HISTFILE=$HOME/.zsh-history |
|---|
| 64 | HISTSIZE=100000 |
|---|
| 65 | SAVEHIST=100000 |
|---|
| 66 | function history-all { history -E 1 } |
|---|
| 67 | |
|---|