1 # Configuration for interactive shells.
3 # Copyright (C) 2009 Nick Bowler
5 # Copying and distribution of this file, with or without modification,
6 # are permitted in any medium without royalty provided the copyright
7 # notice and this notice are preserved. This file is offered as-is,
8 # without any warranty.
10 if [[ -n $HOME ]]; then
11 HISTFILE=$HOME/.zsh_history
20 if [[ $TERM == rxvt-unicode ]]; then
21 [[ -z $COLORTERM ]] && export COLORTERM='rxvt-xpm'
22 [[ -z $COLORFGBG ]] && export COLORFGBG='15;default;0'
25 bindkey '\e[3~' delete-char
26 bindkey '\e[8~' end-of-line
27 bindkey '\e[7~' beginning-of-line
30 bindkey '\e[3~' delete-char
31 bindkey '\e[4~' end-of-line
32 bindkey '\e[1~' beginning-of-line
35 bindkey '\e[3~' delete-char
36 bindkey '\e[F' end-of-line
37 bindkey '\e[H' beginning-of-line
38 bindkey '\eOH' beginning-of-line
39 bindkey '\eOF' end-of-line
42 bindkey '^?' delete-char
43 bindkey '\e[F' end-of-line
44 bindkey '\e[H' beginning-of-line
48 # Keymap-specific bindings
51 bindkey '^R' history-incremental-search-forward
52 bindkey '^P' history-incremental-search-backward
58 xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
59 settitle() { print -Pn $'\e]0;%n@%m %33<...<%~%<<\a' }
62 settitle() { print -Pn $'\e_%n@%m %33<...<%~%<<\e\\' }
69 # Show the return code of failed commands, but don't be noisy about it.
73 if [[ -n $__NEWRUN ]]; then
74 RPS1='%(0?,,%B%F{red}RC=%?%f%b)'
85 # A gentoo-like prompt.
86 PS1='%B%(!,%F{red},%F{green}%n@)%m %F{blue}%33<...<%~%<< %#%f%b '
88 if [ -n $COLORTERM ]; then
89 # Assorted colour-related options
90 export MINICOM="-c on"
93 if [[ -n $SSH_CONNECTION ]]; then
94 PS1=${PS1/green/yellow}
98 export LANG=en_CA.UTF-8
99 export LC_COLLATE=ja_JP.UTF-8
101 # Default options for various utilities.
102 alias ls='ls --time-style=long-iso --color=auto'
103 alias grep='grep --color=auto'