X-Git-Url: https://git.sthu.org/?a=blobdiff_plain;f=dotfiles%2Fzshrc;fp=dotfiles%2Fzshrc;h=0000000000000000000000000000000000000000;hb=f45669f90ad6b6385cc1db351a19c2955cb0e529;hp=877798900e514ab6f400869bdd218fe2256f4f3c;hpb=ea8fc6bd971f594312e1572d3c17cb5502e13085;p=shutils.git diff --git a/dotfiles/zshrc b/dotfiles/zshrc deleted file mode 100644 index 8777989..0000000 --- a/dotfiles/zshrc +++ /dev/null @@ -1,117 +0,0 @@ -# sample by Peter Palfrader: http://svn.noreply.org/svn/weaselutils/trunk/dotfiles/zshrc - -[ -r /etc/zsh/zprofile ] && source /etc/zsh/zprofile -[ -r $HOME/.profile ] && source $HOME/.profile - - -bindkey -e -zstyle :compinstall filename "$HOME/.zshrc" - -autoload -Uz compinit -compinit - -if [ -e $HOME/.bash_completion ]; then - autoload bashcompinit - bashcompinit - source $HOME/.bash_completion -fi - -autoload colors zsh/terminfo -if [[ "$terminfo[colors]" -ge 8 ]]; then - colors -fi - -eval `dircolors` -LS_COLORS="${LS_COLORS}*.divx=01;35:" -zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} - -zstyle ':completion:*' menu select -zmodload -i zsh/complist - - - -# bind special keys according to readline configuration -#eval "$(sed -n 's/^/bindkey /; s/: / /p' /etc/inputrc)" - -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 - - - -setopt \ - EXTENDEDGLOB \ - BASH_AUTO_LIST \ - LIST_AMBIGUOUS \ - CHECK_JOBS \ - INC_APPEND_HISTORY \ - HIST_IGNORE_DUPS \ - HIST_IGNORE_SPACE \ - NO_HUP - - -for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do - eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}' - eval PR_LIGHT_$color='%{$fg[${(L)color}]%}' -done -PR_BOLD="%{$terminfo[bold]%}" -PR_NO_COLOUR="%{$terminfo[sgr0]%}" - -HISTFILE=~/.zsh_history -HISTSIZE=50000 -SAVEHIST=50000 -REPORTTIME=5 -TIMEFMT="$terminfo[bold]$fg[yellow]%J %U user %S sys %P cpu %*E total %M kB max$terminfo[sgr0]" - -autoload -Uz vcs_info && vcs_info -zstyle ':vcs_info:*' enable git cvs svn hg -zstyle ':vcs_info:*' use-prompt-escapes -zstyle ':vcs_info:*' max-exports 1 - - -function setprompt() -{ - # default: " (%s)-[%b|%a]%u%c-" - zstyle ':vcs_info:*' actionformats "${PR_YELLOW}%s:%b|%a${PR_NO_COLOUR} " - # default: " (%s)-[%b]%u%c-" - zstyle ':vcs_info:*' formats "${PR_YELLOW}%s:%b${PR_NO_COLOUR} " - - setopt PROMPT_SUBST - PROMPT='%(!.$PR_RED.$PR_GREEN)%n@%m $PR_BLUE%1~ %# $PR_NO_COLOUR' - RPROMPT='${vcs_info_msg_0_}${PR_STUFF}' -} -setprompt - - -function precmd () -{ - local exitstatus="${?}" - PR_STUFF=" " - if [[ 0 -ne "${exitstatus}" ]] ; then - PR_STUFF="${PR_RED}RET ${exitstatus}${PR_NO_COLOUR}" - fi - vcs_info -} - - -