Paste Description for .zshrc
Ravil's zsh config file
- .zshrc
- Thursday, September 17th, 2009 at 12:41:48pm MDT
- HISTFILE=~/.histfile
- HISTSIZE=1000
- SAVEHIST=1000
- setopt appendhistory extendedglob
- setopt prompt_subst
- #bindkey -v
- zstyle :compinstall filename '/home/ravil/.zshrc'
- autoload -Uz compinit
- compinit
- autoload colors
- colors
- autoload -Uz vcs_info
- # set some colors
- for COLOR in RED GREEN YELLOW WHITE BLACK CYAN; do
- eval PR_$COLOR='%{$fg[${(L)COLOR}]%}'
- eval PR_BRIGHT_$COLOR='%{$fg_bold[${(L)COLOR}]%}'
- done
- PR_RESET="%{${reset_color}%}";
- # set formats
- # %b - branchname
- # %u - unstagedstr (see below)
- # %c - stangedstr (see below)
- # %a - action (e.g. rebase-i)
- # %R - repository path
- # %S - path in the repository
- FMT_BRANCH="${PR_GREEN}%b%u:%c${PR_RESET}" # e.g. master¹²
- FMT_ACTION="(${PR_CYAN}%a${PR_RESET}%)" # e.g. (rebase-i)
- FMT_PATH="%R${PR_YELLOW}/%S" # e.g. ~/repo/subdir
- function precmd {
- vcs_info 'prompt'
- }
- function rprompt {
- local brackets=$1
- local color1=$2
- local color2=$3
- local bracket_open="${color1}${brackets[1]}${PR_RESET}"
- local bracket_close="${color1}${brackets[2]}"
- local git='$vcs_info_msg_0_'
- local cwd="${color2}%B%1~%b"
- RPROMPT="${PR_RESET}${bracket_open}${git}${cwd}${bracket_close}%# ${PR_RESET}"
- }
- function lprompt {
- local brackets=$1
- local color1=$2
- local color2=$3
- local bracket_open="${color1}${brackets[1]}${PR_RESET}"
- local bracket_close="${color1}${brackets[2]}${PR_RESET}"
- local colon="${color1}:"
- local at="${PR_BRIGHT_GREEN}@${PR_RESET}"
- local user_host="${PR_YELLOW}%n${at}${PR_YELLOW}%m"
- local vcs_cwd='${${vcs_info_msg_1_%%.}/$HOME/~}'
- local cwd="${color2}%B%20<..<${vcs_cwd}%<<%b"
- local inner="${user_host}${colon}${cwd}"
- PROMPT="${PR_RESET}${bracket_open}${inner}${bracket_close}${PR_RESET}$ "
- }
- lprompt '[]' $BR_BRIGHT_BLACK $PR_WHITE
- rprompt '()' $BR_BRIGHT_BLACK $PR_WHITE
- # check-for-changes can be really slow.
- # you should disable it, if you work with large repositories
- zstyle ':vcs_info:*:prompt:*' check-for-changes true
- zstyle ':vcs_info:*:prompt:*' unstagedstr '¹' # display ¹ if there are unstaged changes
- zstyle ':vcs_info:*:prompt:*' stagedstr '²' # display ² if there are staged changes
- zstyle ':vcs_info:*:prompt:*' actionformats "${FMT_BRANCH}${FMT_ACTION}//" "${FMT_PATH}"
- zstyle ':vcs_info:*:prompt:*' formats "${FMT_BRANCH}//" "${FMT_PATH}"
- zstyle ':vcs_info:*:prompt:*' nvcsformats "" "%~"
- # подсветка выбранного пункта из автодополнялки и разноцветное меню
- zmodload zsh/complist
- zstyle ':completion:*' menu yes select
- zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
- # бодрое автодополнение для kill и killall
- zstyle ':completion:*:processes' command 'ps -xuf'
- zstyle ':completion:*:processes' sort false
- zstyle ':completion:*:processes-names' command 'ps xho command'
- #PROMPT="%n@%m %~ %(!.#.$) "
- alias ls="ls --color"
- # tetris! %)
- autoload -U tetris
- zle -N tetris
- bindkey "^T" tetris
- autoload -U zcalc
- export MANPAGER="`which most` -s"
- export PATH="$PATH:/opt/sunstudio12.1/bin"
- # manpath="$MANPATH:/home/ravil/Download/SunStudio/sunstudio12.1/man"
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.