79 lines
2.1 KiB
Plaintext
79 lines
2.1 KiB
Plaintext
|
# Skip all this for non-interactive shells
|
||
|
#[[ -z "$PS1" ]] && return
|
||
|
|
||
|
# Use Emacs keybindings
|
||
|
bindkey -e
|
||
|
|
||
|
# Keybindings converted from readline
|
||
|
bindkey "\e[1~" beginning-of-line
|
||
|
bindkey "\e[4~" end-of-line
|
||
|
bindkey "\e[5~" history-search-backward
|
||
|
bindkey "\e[6~" history-search-forward
|
||
|
bindkey "\e[3~" delete-char
|
||
|
bindkey "\e[2~" quoted-insert
|
||
|
bindkey "\e[5C" forward-word
|
||
|
bindkey "\e[5D" backward-word
|
||
|
bindkey "\e\e[C" forward-word
|
||
|
bindkey "\e\e[D" backward-word
|
||
|
bindkey "\e[1;5C" forward-word
|
||
|
bindkey "\e[1;5D" backward-word
|
||
|
bindkey "\eOc" forward-word
|
||
|
bindkey "\eOd" backward-word
|
||
|
bindkey "\e[1;3C" forward-word
|
||
|
bindkey "\e[1;3D" backward-word
|
||
|
bindkey "\e[8~" end-of-line
|
||
|
bindkey "\eOH" beginning-of-line
|
||
|
bindkey "\eOF" end-of-line
|
||
|
bindkey "\e[H" beginning-of-line
|
||
|
bindkey "\e[F" end-of-line
|
||
|
bindkey "\e[7~" beginning-of-line
|
||
|
bindkey "\e[8~" end-of-line
|
||
|
bindkey "^P" push-input
|
||
|
|
||
|
# Setup history
|
||
|
HISTFILE=~/.histfile
|
||
|
HISTSIZE=10000
|
||
|
SAVEHIST=10000
|
||
|
|
||
|
# Options
|
||
|
setopt inc_append_history
|
||
|
setopt share_history
|
||
|
setopt hist_ignore_all_dups
|
||
|
setopt hist_ignore_dups
|
||
|
setopt appendhistory
|
||
|
setopt autocd
|
||
|
setopt autopushd
|
||
|
setopt pushdminus
|
||
|
setopt extendedglob
|
||
|
setopt nomatch
|
||
|
setopt notify
|
||
|
setopt complete_in_word
|
||
|
|
||
|
|
||
|
# Tab-Completion
|
||
|
zstyle ':completion:*' list-colors ${(s.:.)LSCOLORS}
|
||
|
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
|
||
|
zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||
|
zstyle ':completion:*' menu select=1
|
||
|
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
|
||
|
zstyle ':completion:*' use-compctl false
|
||
|
zstyle ':completion:*' verbose true
|
||
|
|
||
|
# Only show local files in the completion, no gopher://, cdda:// etc.
|
||
|
zstyle ':completion:*:*:mplayer:*' tag-order files
|
||
|
|
||
|
autoload -Uz compinit
|
||
|
compinit
|
||
|
|
||
|
# Enable color support of ls
|
||
|
if [[ "$TERM" != "dumb" ]]; then
|
||
|
if [[ -x `which dircolors` ]]; then
|
||
|
eval `dircolors -b`
|
||
|
alias 'ls=ls --color=auto'
|
||
|
fi
|
||
|
fi
|
||
|
|
||
|
# Set prompt
|
||
|
PS1=$'%(!.%{\e[01;32m%}.%{\e[01;31m%})%(?..%? )%(!.%{\e[01;31m%}.%{\e[01;32m%})%n@%m%{\e[01;34m%} %~ %{\e[00m%}%(!.#.$) '
|
||
|
|