#!/usr/bin/zsh -i zmodload zsh/zprof bindkey -v autoload -Uz edit-command-line zle -N edit-command-line bindkey -M vicmd v edit-command-line HISTFILE="$HOME/.histfile" HISTSIZE=$((1 << 16)) SAVEHIST=$HISTSIZE setopt hist_ignore_all_dups hist_save_no_dups hist_reduce_blanks share_history extended_history fpath=("$HOME/.zfunc" "$HOME/.zfunc/zsh-completions/src" $fpath) alias diff='diff --color=auto' alias ls='ls -F --color=auto' alias grep='grep --color=auto' alias sudo='sudo ' alias run0='run0 ' autoload -Uz compinit promptinit zmodload zsh/complist zstyle ':completion:*' menu select zstyle ':completion:*' verbose yes zstyle ':completion:*' completer _expand _complete _ignored _approximate zstyle ':completion:*' group-name '' zstyle ':completion:*:descriptions' format '%B%d%b' zstyle ':completion:*:messages' format '%d' zstyle ':completion:*:warnings' format 'No matches for: %d' zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b' zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" zstyle ':completion:*' complete-options true zstyle ':completion:*' rehash true zstyle ':completion:*:*:-command-:*:*' group-order alias builtins functions commands compinit bindkey -M menuselect 'h' vi-backward-char bindkey -M menuselect 'k' vi-up-line-or-history bindkey -M menuselect 'l' vi-forward-char bindkey -M menuselect 'j' vi-down-line-or-history promptinit prompt marc setopt no_clobber setopt extendedglob setopt auto_cd auto_pushd pushd_silent pushd_to_home pushd_ignore_dups pushd . autoload -Uz run-help (( ${+aliases[run-help]} )) && unalias run-help alias help=run-help autoload -Uz e v p bell zstyle ':vcs_info:*' check-for-changes true zstyle ':vcs_info:*' get-revision true zstyle ':vcs_info:*' formats "(%s)-[%b]%m%u%c" zstyle ':vcs_info:*' actionformats "(%s)-[%b]%m%u%c" zstyle ':vcs_info:git*+set-message:*' hooks git-untracked +vi-git-untracked() { if [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) == 'true' ]] && \ git status --porcelain | grep -m 1 '^??' &>/dev/null then hook_com[misc]='T' fi } zstyle ':vcs_info:git*+set-message:*' hooks git-st function +vi-git-st() { local ahead behind local -a gitstatus ahead=$(git rev-list ${hook_com[branch]}@{upstream}..HEAD 2>/dev/null | wc -l) (( $ahead )) && gitstatus+=( "+${ahead}" ) behind=$(git rev-list HEAD..${hook_com[branch]}@{upstream} 2>/dev/null | wc -l) (( $behind )) && gitstatus+=( "-${behind}" ) hook_com[misc]+=${(j:/:)gitstatus} }