Created
April 14, 2009 21:20
-
-
Save neaf/95437 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# history | |
HISTFILE=~/.zsh_history | |
HISTSIZE=5000 | |
SAVEHIST=1000 | |
export LS_COLORS='no=00:fi=00:di=01;36:ln=01;37:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;35:*.pl=00;31:*.PL=00;31:*.pm=00;31:*.tt=00;31:*.js=00;31:*.rb=00;31:*.py=00;31:*.yml=00;31:*.sql=00;31:*.html=00;31:*.css=00;31:'; | |
autoload -U colors && colors | |
PS1="%{${fg[blue]}%}[%{${fg[yellow]}%}%~%{${fg[blue]}%}] %{${fg[yellow]}%}#%{$reset_color%} " | |
alias ls='ls --color=auto' | |
autoload -U compinit | |
compinit | |
setopt complete_in_word | |
zstyle ':completion:*' completer _complete _prefix | |
zstyle ':completion:*' add-space true | |
zstyle ':completion:*:descriptions' format '%W%d%b' | |
zstyle ':completion:*' menu select=long-list select=1 | |
zstyle ':completion:*:*:*:*' list-suffixes yes | |
setopt extended_glob | |
highlights='${PREFIX:+=(#bi)($PREFIX:t)(?)*==31=1;32}':${(s.:.)LS_COLORS}} | |
zstyle -e ':completion:*' list-colors 'reply=( "'$highlights'" )' | |
unset highlights | |
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} | |
#zmodload -i zsh/complist | |
#zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} | |
precmd () { | |
case $TERM in | |
screen) | |
print -Pn "\e]0;%n@%m: %~\a" | |
print -Pn "\ekzsh: %~\e\\" | |
;; | |
xterm*|rxvt) | |
print -Pn "\e]0;%n@%m: %~\a" | |
;; | |
esac | |
} | |
preexec () { | |
case $TERM in | |
screen) | |
print -Pn "\e]0;%n@%m: $1\a" | |
print -Pn "\ek$1\e\\" | |
;; | |
xterm*|rxvt) | |
print -Pn "\e]0;%n@%m: $1\a" | |
;; | |
esac | |
} | |
# key bindings | |
case $TERM in | |
*rxvt*) # rxvt derivatives | |
bindkey '^[[3~' delete-char # delete | |
bindkey '^[Oc' forward-word # ctrl right | |
bindkey '^[0d' backward-word # ctrl left | |
bindkey '^[[7~' beginning-of-line # home | |
bindkey '^[[8~' end-of-line # end | |
;; | |
screen) | |
bindkey '^[[1~' beginning-of-line # home | |
bindkey '^[[4~' end-of-line # end | |
bindkey '^[[3~' delete-char # delete | |
bindkey '^[Oc' forward-word # ctrl right | |
bindkey '^[Od' backward-word # ctrl left | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment