annotate zshrc @ 16:457d7aa2cb2f default tip

from oleander PowerBookG4.
author kent <kent@cr.ie.u-ryukyu.ac.jp>
date Fri, 12 Mar 2010 16:58:46 +0900
parents 0c7dda2541f6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 # このファイルは対話的シェルで読み込まれる
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 # this file will be loaded by interractive shell
8
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 6
diff changeset
3 #
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 6
diff changeset
4 PATH="$HOME/opt/bin:$HOME/opt/scripts:$PATH"
0
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 # Lines configured by zsh-newuser-install
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 HISTFILE=~/.zsh_history
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 HISTSIZE=1000
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 SAVEHIST=1000
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 setopt appendhistory autocd
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 bindkey -e
14
0c7dda2541f6 modify zshrc
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
12
0c7dda2541f6 modify zshrc
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
13 bindkey '^[^B' backward-word
0c7dda2541f6 modify zshrc
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
14 bindkey '^[^F' forward-word
0c7dda2541f6 modify zshrc
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
15
0c7dda2541f6 modify zshrc
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
16
0
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 # End of lines configured by zsh-newuser-install
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 # The following lines were added by compinstall
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19
11
590cacb6b801 modify many things of Xdefaults.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 10
diff changeset
20 zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
590cacb6b801 modify many things of Xdefaults.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 10
diff changeset
21 zstyle ':completion:*' matcher-list ''
590cacb6b801 modify many things of Xdefaults.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 10
diff changeset
22 zstyle ':completion:*' max-errors 2 numeric
590cacb6b801 modify many things of Xdefaults.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 10
diff changeset
23 zstyle :compinstall filename '/home/kent/.zshrc'
590cacb6b801 modify many things of Xdefaults.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 10
diff changeset
24
590cacb6b801 modify many things of Xdefaults.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 10
diff changeset
25 autoload -Uz compinit
590cacb6b801 modify many things of Xdefaults.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 10
diff changeset
26 compinit
0
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 # End of lines added by compinstall
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28
2
0b76aa764126 20090302
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
29 alias ls='ls -F --show-control-chars --color=auto'
0
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 alias la='ls -a'
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 alias ll='ls -l'
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 alias b='popd'
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 alias vi='vim'
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 alias sless='less -x4 -S'
13
1dec272d7d09 zshrc: change prompt
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
35 alias man='LANGUAGE= LANG= LC_ALL=C man'
1dec272d7d09 zshrc: change prompt
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
36 #alias octave='GNUTERM=aqua /Applications/Octave.app/Contents/Resources/bin/octave'
0
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37
13
1dec272d7d09 zshrc: change prompt
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
38 #alias mail='msmtp --host=nirai.ie.u-ryukyu.ac.jp --port=587 --auth=plain --user=k088511 --from=kent@cr.ie.u-ryukyu.ac.jp'
2
0b76aa764126 20090302
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
39 alias PASTE='xsel -o'
0b76aa764126 20090302
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
40 alias COPY='xsel -i'
10
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
41 alias open='pcmanfm'
2
0b76aa764126 20090302
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
42
0
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 setopt prompt_subst
13
1dec272d7d09 zshrc: change prompt
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
44 PROMPT='%{%}<%{%}%{%}%n%{%}:%{%}%m%{%}%{%}>%{%} '
0
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 #PROMPT='[%{%}%n%{%}%{%}@%{%}%{%}%m%{%}]%# '
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 RPROMPT='%{[$[32+$RANDOM % 5]m%}%2~%{%}%(1j.:&%j.)%(?..:?%?)'
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 #RPROMPT='%(1j.%j.x)'
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 # %j -- the number of jobs
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 # %~ -- current directory
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 # %m -- hostname up to the first `.'
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 # %n -- username
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 # %(x.str1.str2) : true then str1, false then str2
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 # x = `Nj' or `N?' or ...
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 # j: the number of jobs is at least N
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 # ?: prev command exit status is at least N
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
56
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
57
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 setopt autopushd pushdminus
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 # ~+0 ~+1 ~+2 ... dirs -v の上から ~0 ~1 ~2 も同じ
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 # ~-0 ~-1 ~-2 ... dirs -v の下から
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 # pushdminus をセットすると+-が逆転するが,~0 ~1 ~2などは変わらない
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
62
2
0b76aa764126 20090302
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
63 eval `dircolors ~/.dir_colors`
0
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 zmodload zsh/complist
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 export ZLS_COLORS="$LS_COLORS"
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
66
10
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
67 zle_highlight=(special:underline,bold,bg=magenta,fg=black isearch:bold,bg=cyan,fg=black region:bold,bg=yellow,fg=black)
0
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
68
14
0c7dda2541f6 modify zshrc
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
69
0c7dda2541f6 modify zshrc
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
70 # original functions
0c7dda2541f6 modify zshrc
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
71 funciton conf() {
0c7dda2541f6 modify zshrc
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
72 if [ -f "$1" ]; then
0c7dda2541f6 modify zshrc
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
73 file=$1
0c7dda2541f6 modify zshrc
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
74 else
0c7dda2541f6 modify zshrc
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
75 file=config.log
0c7dda2541f6 modify zshrc
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
76 fi
0c7dda2541f6 modify zshrc
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
77 head -7 $file | tail -1
0c7dda2541f6 modify zshrc
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
78 }
0c7dda2541f6 modify zshrc
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
79
6
ea2aed24ddd0 09/05/25
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
80 #disable mkdir
2
0b76aa764126 20090302
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
81
0
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 # zsh read followed files
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 # /etc/zshenv, $ZDOTDIR/.zshenv
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 # /etc/zprofile, $ZDOTDIR/.zprofile IF (login shell)
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 # /etc/zshrc, $ZDOTDIR/.zshrc IF (interactive shell)
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 # /etc/zlogin, $ZDOTDIR/.zlogin IF (login shell)
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
87
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
88 screen -ls
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
89
6d5c73fe5744 Go over to mercurial from CVS.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
90