1 # sample by Peter Palfrader: http://svn.noreply.org/svn/weaselutils/trunk/dotfiles/zshrc
3 [ -r /etc/zsh/zprofile ] && source /etc/zsh/zprofile
4 [ -r $HOME/.profile ] && source $HOME/.profile
8 zstyle :compinstall filename "$HOME/.zshrc"
11 autoload -U compinit promptinit
13 zstyle ':completion::complete:*' use-cache 1
15 autoload colors zsh/terminfo
16 if [[ "$terminfo[colors]" -ge 8 ]]; then
21 LS_COLORS="${LS_COLORS}*.divx=01;35:"
22 zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
24 zstyle ':completion:*' menu select
25 zmodload -i zsh/complist
30 # bind special keys according to readline configuration
31 #eval "$(sed -n 's/^/bindkey /; s/: / /p' /etc/inputrc)"
33 bindkey "\e[1~" beginning-of-line
34 bindkey "\e[4~" end-of-line
35 bindkey "\e[5~" history-search-backward
36 bindkey "\e[6~" history-search-forward
37 bindkey "\e[3~" delete-char
38 bindkey "\e[2~" quoted-insert
39 bindkey "\e[5C" forward-word
40 bindkey "\e[5D" backward-word
41 bindkey "\e\e[C" forward-word
42 bindkey "\e\e[D" backward-word
43 bindkey "\e[1;5C" forward-word
44 bindkey "\e[1;5D" backward-word
45 bindkey "\eOc" forward-word
46 bindkey "\eOd" backward-word
47 bindkey "\e[1;3C" forward-word
48 bindkey "\e[1;3D" backward-word
49 bindkey "\e[8~" end-of-line
50 bindkey "\eOH" beginning-of-line
51 bindkey "\eOF" end-of-line
52 bindkey "\e[H" beginning-of-line
53 bindkey "\e[F" end-of-line
54 bindkey "\e[7~" beginning-of-line
55 bindkey "\e[8~" end-of-line
70 for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
71 eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
72 eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
74 PR_BOLD="%{$terminfo[bold]%}"
75 PR_NO_COLOUR="%{$terminfo[sgr0]%}"
77 HISTFILE=~/.zsh_history
81 TIMEFMT="$fg[magenta]%J %U user %S sys %P cpu %*E total %M kB max$terminfo[sgr0]"
83 autoload -Uz vcs_info && vcs_info
84 zstyle ':vcs_info:*' enable git cvs svn hg
85 zstyle ':vcs_info:*' use-prompt-escapes
86 zstyle ':vcs_info:*' max-exports 1
91 # default: " (%s)-[%b|%a]%u%c-"
92 zstyle ':vcs_info:*' actionformats " %s: %b|%a"
93 # default: " (%s)-[%b]%u%c-"
94 zstyle ':vcs_info:*' formats " %s: %b"
98 %(!.%{$fg_bold[red]%}.%{$fg_bold[green]%})%n@%m%{$reset_color%}$PR_SCREEN$PR_JOBS%{$fg_bold[yellow]%}${vcs_info_msg_0_}%{$reset_color%} %{$fg_bold[blue]%}%~%{$reset_color%}
103 # Obtain the autofs mountpoints
105 [ -r /etc/auto.master ] && autofs_mp=$(/bin/grep -e "^/" /etc/auto.master)
109 PR_EXIT="%{$fg_bold[red]%}%(?..[%?] )%{$reset_color%}"
111 # autofs always complains not being able to mount .hg/ and the like
112 if echo "$autofs_mp" | /bin/grep -qe "^$PWD\s"; then
113 vcs_info_msg_0_="[autofs]"
119 if [[ -n "${WINDOW}" ]]; then
120 PR_SCREEN=" S:${WINDOW}"
124 if [[ $(jobs | wc -l) -gt 0 ]]; then