root/dotfiles/zsh/teramako-zshrc @ 18898

Revision 14474, 1.6 kB (checked in by teramako, 6 years ago)

new add

Line 
1# Created by newuser for 4.3.6
2
3bindkey -v
4
5setopt prompt_subst
6
7# プロンプト設定
8case "$TERM" in
9        xterm|kterm|mterm|rxvt*)
10        PROMPT='%{%}%m%B[%D %T]%b%{%}\$ '
11        RPROMPT='[%{%}%4c%{%}]'
12        ;;
13        screen*)
14        PROMPT='%{%}%m%B[%D %T]%b%{%}\$ '
15        RPROMPT='[%{%}%4c%{k%c\\%}]'
16        ;;
17esac
18
19autoload -U colors
20colors
21
22autoload -U compinit
23compinit -u
24
25zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
26
27setopt no_flow_control
28setopt no_beep
29setopt ignore_eof
30setopt auto_list
31setopt extended_glob
32setopt auto_cd
33setopt auto_pushd
34setopt no_tify
35
36# history setting {{{
37autoload history-search-end
38zle -N history-beginning-search-backward-end history-search-end
39zle -N history-beginning-search-forward-end history-search-end
40bindkey "^P" history-beginning-search-backward-end
41bindkey "^N" history-beginning-search-forward-end
42HISTFILE=~/.zsh_history
43HISTSIZE=10000
44SAVEHIST=10000
45setopt hist_ignore_dups
46setopt share_history
47setopt hist_ignore_space
48setopt hist_expand
49# }}}
50
51bindkey -a 'O' push-line
52bindkey -a 'H' run-help
53bindkey -a '^A' vi-beginning-of-line
54bindkey -a '^E' vi-end-of-line
55bindkey -v '^[OH' vi-beginning-of-line
56bindkey -v '^[OF' vi-end-of-line
57
58# GNU screen setting
59case "${TERM}" in
60        screen*)
61        alias man='set_title man'
62        ;;
63esac
64
65function set_title(){
66        echo -ne "k$@\\"
67        "$@"
68}
69function preexec(){
70        if [[ $TERM = screen* ]];then
71                echo -ne "k${PWD/${HOME}/~}\$ $1\\"
72        else
73                echo -ne "\033]0;${PWD/${HOME}/~}\$ $1\007"
74        fi
75}
76function chpwd(){
77        if [[ $TERM = screen* ]];then
78                echo -ne "k${PWD/${HOME}/~}\\"
79        else
80                echo -ne "\033]0;${PWD/${HOME}/~}\007"
81        fi
82        ls -A
83}
84
85# vim: sw=2 ts=2 sts=0 fdm=marker:
Note: See TracBrowser for help on using the browser.