Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # The following lines were added by compinstall
- zstyle ':completion:*:approximate:' max-errors 'reply=( $((($#PREFIX+$#SUFFIX)/3 )) numeric )'
- zstyle ':completion:*:complete:-command-::commands' ignored-patterns '(aptitude-*|*\~)'
- zstyle ':completion:*:correct:*' insert-unambiguous true
- zstyle ':completion:*:corrections' format $'%{\e[0;31m%}%d (errors: %e)%{\e[0m%}'
- zstyle ':completion:*:correct:*' original true
- zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
- zstyle ':completion:*:descriptions' format $'%{\e[0;31m%}completing %B%d%b%{\e[0m%}'
- zstyle ':completion:*:expand:*' tag-order all-expansions
- zstyle ':completion:*:history-words' list false
- zstyle ':completion:*:history-words' menu yes
- zstyle ':completion:*:history-words' remove-all-dups yes
- zstyle ':completion:*:history-words' stop yes
- zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
- zstyle ':completion:*:matches' group 'yes'
- zstyle ':completion:*' group-name ''
- zstyle ':completion:*' menu select=5
- zstyle ':completion:*:messages' format '%d'
- zstyle ':completion:*:options' auto-description '%d'
- zstyle ':completion:*:options' description 'yes'
- zstyle ':completion:*:processes' command 'ps -au$USER'
- zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
- zstyle ':completion:*' verbose true
- zstyle ':completion:*:-command-:*:' verbose false
- zstyle ':completion:*:warnings' format $'%{\e[0;31m%}No matches for:%{\e[0m%} %d'
- zstyle ':completion:*:*:zcompile:*' ignored-patterns '(*~|*.zwc)'
- zstyle ':completion:correct:' prompt 'correct to: %e'
- zstyle ':completion::(^approximate*):*:functions' ignored-patterns '_*'
- zstyle ':completion:*:processes-names' command 'ps c -u ${USER} -o command | uniq'
- zstyle ':completion:*:manuals' separate-sections true
- zstyle ':completion:*:manuals.*' insert-sections true
- zstyle ':completion:*:man:*' menu yes select
- zstyle ':completion:*:sudo:*' command-path /usr/local/sbin \
- /usr/local/bin \
- /usr/sbin \
- /usr/bin \
- /sbin \
- /bin \
- zstyle ':completion:*' special-dirs ..
- function _force_rehash () {
- (( CURRENT == 1 )) && rehash
- return 1
- }
- zstyle -e ':completion:*' completer '
- if [[ $_last_try != "$HISTNO$BUFFER$CURSOR" ]] ; then
- _last_try="$HISTNO$BUFFER$CURSOR"
- reply=(_complete _match _ignored _prefix _files)
- else
- if [[ $words[1] == (rm|mv) ]] ; then
- reply=(_complete _files)
- else
- reply=(_oldlist _expand _force_rehash _complete _ignored _correct _approximate _files)
- fi
- fi'
- zstyle ':completion:*:urls' local 'www' '/var/www/' 'public_html'
- zstyle ':completion::complete:*' gain-privileges 1
- zstyle :compinstall filename '/home/pk/.zshrc'
- autoload -Uz compinit
- compinit
- # End of lines added by compinstall
- # Lines configured by zsh-newuser-install
- HISTORY_IGNORE="(exit|clear|reset)"
- HISTFILE=~/.zsh_history
- HISTSIZE=500
- SAVEHIST=5000
- setopt appendhistory
- setopt autocd
- setopt beep
- setopt extendedglob
- setopt nomatch
- setopt notify
- setopt complete_aliases
- setopt always_to_end
- setopt complete_in_word
- setopt nomatch
- setopt hist_ignore_all_dups
- setopt hist_ignore_space
- setopt hist_save_no_dups
- setopt share_history
- setopt list_packed
- setopt correct
- setopt prompt_subst
- bindkey -e
- # End of lines configured by zsh-newuser-install
- # load a few modules
- if [[ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]]; then
- . /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
- fi
- autoload -U zmv
- autoload -U zed
- autoload -U zargs
- autoload -U colors && colors
- # set default programmes
- export EDITOR=${EDITOR:-ex}
- export VISUAL=${VISUAL:-vimx}
- export PAGER=${PAGER:-less}
- export SYSTEMD_LESS="RM"
- # set alias'
- alias vim="vimx"
- alias ls="ls -v --color=auto -N --group-directories-first"
- # report about cpu-/system-/user-time of command if running longer than
- # 5 seconds
- REPORTTIME=5
- # support colors in less
- export LESS_TERMCAP_mb=$'\E[01;31m'
- export LESS_TERMCAP_md=$'\E[01;31m'
- export LESS_TERMCAP_me=$'\E[0m'
- export LESS_TERMCAP_se=$'\E[0m'
- export LESS_TERMCAP_so=$'\E[01;44;33m'
- export LESS_TERMCAP_ue=$'\E[0m'
- export LESS_TERMCAP_us=$'\E[01;32m'
- # Modify the colors and symbols in these variables as desired.
- GIT_PROMPT_SYMBOL="%{$fg[blue]%}±"
- GIT_PROMPT_PREFIX="%{$fg[green]%}[%{$reset_color%}"
- GIT_PROMPT_SUFFIX="%{$fg[green]%}]%{$reset_color%}"
- GIT_PROMPT_AHEAD="%{$fg[red]%}ANUM%{$reset_color%}"
- GIT_PROMPT_BEHIND="%{$fg[cyan]%}BNUM%{$reset_color%}"
- GIT_PROMPT_MERGING="%{$fg[magenta]%}⚡︎%{$reset_color%}"
- GIT_PROMPT_UNTRACKED="%{$fg[red]%}●%{$reset_color%}"
- GIT_PROMPT_MODIFIED="%{$fg[yellow]%}●%{$reset_color%}"
- GIT_PROMPT_STAGED="%{$fg[green]%}●%{$reset_color%}"
- # Show Git branch/tag, or name-rev if on detached head
- parse_git_branch() {
- (git symbolic-ref -q HEAD || git name-rev --name-only --no-undefined --always HEAD) 2> /dev/null
- }
- # Show different symbols as appropriate for various Git repository states
- parse_git_state() {
- # Compose this value via multiple conditional appends.
- local GIT_STATE=""
- local NUM_AHEAD="$(git log --oneline @{u}.. 2> /dev/null | wc -l | tr -d ' ')"
- if [ "$NUM_AHEAD" -gt 0 ]; then
- GIT_STATE=$GIT_STATE${GIT_PROMPT_AHEAD//NUM/$NUM_AHEAD}
- fi
- local NUM_BEHIND="$(git log --oneline ..@{u} 2> /dev/null | wc -l | tr -d ' ')"
- if [ "$NUM_BEHIND" -gt 0 ]; then
- GIT_STATE=$GIT_STATE${GIT_PROMPT_BEHIND//NUM/$NUM_BEHIND}
- fi
- local GIT_DIR="$(git rev-parse --git-dir 2> /dev/null)"
- if [ -n $GIT_DIR ] && test -r $GIT_DIR/MERGE_HEAD; then
- GIT_STATE=$GIT_STATE$GIT_PROMPT_MERGING
- fi
- if [[ -n $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
- GIT_STATE=$GIT_STATE$GIT_PROMPT_UNTRACKED
- fi
- if ! git diff --quiet 2> /dev/null; then
- GIT_STATE=$GIT_STATE$GIT_PROMPT_MODIFIED
- fi
- if ! git diff --cached --quiet 2> /dev/null; then
- GIT_STATE=$GIT_STATE$GIT_PROMPT_STAGED
- fi
- if [[ -n $GIT_STATE ]]; then
- echo "$GIT_PROMPT_PREFIX$GIT_STATE$GIT_PROMPT_SUFFIX"
- fi
- }
- # If inside a Git repository, print its branch and state
- git_prompt_string() {
- local git_where="$(parse_git_branch)"
- [ -n "$git_where" ] && echo "$GIT_PROMPT_SYMBOL$(parse_git_state)$GIT_PROMPT_PREFIX%{$fg[yellow]%}${git_where#(refs/heads/|tags/)}$GIT_PROMPT_SUFFIX"
- }
- # prompts
- PS1='%(#.[%F{red}%B%n%b%f@%m %1~].[%F{blue}%B%n%b%f@%m %1~])$(git_prompt_string)%(#.#.$) '
- PS2="> "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement