#history setopt share_history export HISTSIZE=10000 export SAVEHIST=10000 export HISTFILE=~/.zhistory setopt inc_append_history #color autoload -U colors colors #auto completion autoload -U compinit compinit #binding bindkey "\e[2~" transpose-words bindkey "\e[3~" delete-char bindkey "^[[F" end-of-line bindkey '\e[2~' overwrite-mode bindkey '^[[H' beginning-of-line bindkey '^[[5~' up-line-or-history bindkey '^[[6~' down-line-or-history bindkey '^[[A' up-line-or-search bindkey '^[[D' backward-char bindkey '^[[B' down-line-or-search bindkey '^[[C' forward-char #alias alias ls='ls --color=auto -F' alias ..='cd ..' alias dizinegit='cd `kdialog --getexistingdirectory /`' compctl -/ cd #prompt if [ `/usr/bin/whoami` = 'root' ] then PS1="%B%{$fg[red]%}> %{$reset_color%}%b" export RPROMPT="%U%B%{$fg[red]%}%n%{$reset_color%}%b%u @ %{$fg[green]%}(%~)%{$reset_color%}" else PS1="%B%{$fg[green]%}> %{$reset_color%}%b" export RPROMPT="%B%{$fg[green]%}%n%{$reset_color%}%b @ %{$fg[green]%}(%~)%{$reset_color%}" fi #cache zstyle ':completion:*' use-cache on zstyle ':completion:*' cache-path ~/.zshcache setopt COMPLETE_IN_WORD #auto correction zstyle ':completion:*' completer _complete _match _approximate zstyle ':completion:*:match:*' original only zstyle ':completion:*:approximate:*' max-errors 1 numeric zstyle ':completion:*:functions' ignored-patterns '_*' setopt CORRECT setopt AUTO_LIST #background setopt NOBGNICE #i dont like sound setopt NO_BEEP #if i say a directory name, cd into it setopt AUTO_CD #------------------------------ # Window title #------------------------------ case $TERM in *xterm*|rxvt|rxvt-unicode|rxvt-256color|(dt|k|E)term) precmd () { print -Pn "\e]0;$TERM - (%L) [%n@%M]%# [%~]\a" } preexec () { print -Pn "\e]0;$TERM - (%L) [%n@%M]%# [%~] ($1)\a" } ;; screen) precmd () { print -Pn "\e]83;title \"$1\"\a" print -Pn "\e]0;$TERM - (%L) [%n@%M]%# [%~]\a" } preexec () { print -Pn "\e]83;title \"$1\"\a" print -Pn "\e]0;$TERM - (%L) [%n@%M]%# [%~] ($1)\a" } ;; esac #calculator? :) autoload -U zcalc autoload -U zmv # set these associated aliases: alias mmv='noglob zmv -W' # user-friendly version of zmv