.zshrc
author Oleksandr Gavenko <gavenkoa@gmail.com>
Tue, 13 Nov 2012 19:01:48 +0200
changeset 589 e1812451b4f8
parent 245 aefd2167af31
child 651 649cbbab7ded
permissions -rw-r--r--
Fix syntax error.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
215
7b1b6872e92e Include system wide /etc/zshrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 214
diff changeset
     1
7b1b6872e92e Include system wide /etc/zshrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 214
diff changeset
     2
if [[ -e /etc/zshrc ]]; then
7b1b6872e92e Include system wide /etc/zshrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 214
diff changeset
     3
. /etc/zshrc
7b1b6872e92e Include system wide /etc/zshrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 214
diff changeset
     4
fi
179
ed15e30ff41a Set editor to VIM. Bind edit command for shells.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 177
diff changeset
     5
ed15e30ff41a Set editor to VIM. Bind edit command for shells.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 177
diff changeset
     6
EDITOR=vim
172
755ff9f067d0 zsh basic settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     7
180
176106ed8e46 Set prompt for shell.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 179
diff changeset
     8
PS1='zsh# '
176106ed8e46 Set prompt for shell.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 179
diff changeset
     9
181
11880eae9332 Set CDPATH.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 180
diff changeset
    10
# Easy cd to often used dirs.
11880eae9332 Set CDPATH.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 180
diff changeset
    11
CDPATH=.:~:~/devel:~/devel/my-devel
11880eae9332 Set CDPATH.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 180
diff changeset
    12
172
755ff9f067d0 zsh basic settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    13
HISTFILE=~/.histfile
214
7d52ae0eda9b Increase HIST size.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 181
diff changeset
    14
HISTSIZE=10000
7d52ae0eda9b Increase HIST size.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 181
diff changeset
    15
SAVEHIST=10000
172
755ff9f067d0 zsh basic settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    16
177
95c784cc8cbb History settings for zsh.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 172
diff changeset
    17
setopt autocd beep extendedglob nomatch notify
95c784cc8cbb History settings for zsh.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 172
diff changeset
    18
95c784cc8cbb History settings for zsh.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 172
diff changeset
    19
setopt hist_ignore_all_dups
95c784cc8cbb History settings for zsh.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 172
diff changeset
    20
setopt append_history
95c784cc8cbb History settings for zsh.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 172
diff changeset
    21
setopt hist_ignore_space
95c784cc8cbb History settings for zsh.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 172
diff changeset
    22
setopt hist_no_functions
172
755ff9f067d0 zsh basic settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    23
179
ed15e30ff41a Set editor to VIM. Bind edit command for shells.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 177
diff changeset
    24
autoload -U edit-command-line
ed15e30ff41a Set editor to VIM. Bind edit command for shells.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 177
diff changeset
    25
zle -N edit-command-line
ed15e30ff41a Set editor to VIM. Bind edit command for shells.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 177
diff changeset
    26
bindkey '\ee' edit-command-line
ed15e30ff41a Set editor to VIM. Bind edit command for shells.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 177
diff changeset
    27
172
755ff9f067d0 zsh basic settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    28
# Emacs like editing.
755ff9f067d0 zsh basic settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    29
bindkey -e
755ff9f067d0 zsh basic settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    30
243
843cc9d49dc2 Enable history search.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 215
diff changeset
    31
bindkey "^[[A" history-search-backward
843cc9d49dc2 Enable history search.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 215
diff changeset
    32
bindkey "^[[B" history-search-forward
843cc9d49dc2 Enable history search.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 215
diff changeset
    33
245
aefd2167af31 Enable completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 243
diff changeset
    34
autoload -U compinit
aefd2167af31 Enable completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 243
diff changeset
    35
compinit
aefd2167af31 Enable completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 243
diff changeset
    36
aefd2167af31 Enable completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 243
diff changeset
    37
# autoload -U promptinit
aefd2167af31 Enable completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 243
diff changeset
    38
# promptinit
aefd2167af31 Enable completion.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 243
diff changeset
    39
# prompt walters