blob: f2acf79c0de319d1b3df93328d9da406a8a599ba (
plain) (
tree)
|
|
### Added by Zinit's installer
# if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then
# print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
# command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit"
# command git clone https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git" && \
# print -P "%F{33} %F{34}Installation successful.%f%b" || \
# print -P "%F{160} The clone has failed.%f%b"
# fi
# source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
# autoload -Uz _zinit
# (( ${+_comps} )) && _comps[zinit]=_zinit
export ZSH=/home/devi/.oh-my-zsh
zmodload zsh/zprof
ZSH_THEME="devi"
COMPLETION_WAITING_DOTS="false"
plugins=(git evalcache zsh-syntax-highlighting autojump virtualenv virtualenvwrapper rust npm docker zsh-autosuggestions zsh-kubectl-prompt kubectl docker-compose vagrant golang zsh-prompt-benchmark)
# https://thevaluable.dev/zsh-completion-guide-examples/
zstyle ':completion:*' menu select
zstyle ':completion:*:*:*:*:descriptions' format '%F{green}-- %d --%f'
zstyle ':completion:*:*:*:*:corrections' format '%F{yellow}!- %d (errors: %e) -!%f'
zstyle ':completion:*:messages' format ' %F{purple} -- %d --%f'
zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f'
zstyle ':completion:*' group-name ''
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
zstyle ':completion:*' special-dirs true
zstyle ':vcs_info:*' enable git svn hg
zstyle ':vcs_info:*:*' check-for-changes true
zstyle ':vcs_info:*:*' stagedstr "+"
zstyle ':vcs_info:*:*' unstagedstr "!"
zstyle ':vcs_info:git*+set-message:*' hooks git-untracked
zstyle ':vcs_info:git*+set-message:*' hooks git-st
zstyle ':vcs_info:git*+set-message:*' hooks git-remotebranch
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:git:*' formats ' [%s|%b %u%c%a:%r]'
zstyle ':vcs_info:git:*' actionformats '(%s|%b|%a%u%c:%r)'
# https://opensource.apple.com/source/zsh/zsh-61/zsh/Misc/vcs_info-examples.auto.html
+vi-git-untracked(){
if [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) == 'true' ]] && \
git status --porcelain | grep '??' &> /dev/null ; then
hook_com[staged]+='T'
fi
}
+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}
}
+vi-git-remotebranch() {
local remote
remote=${$(git rev-parse --verify ${hook_com[branch]}@{upstream} \
--symbolic-full-name 2>/dev/null)/refs\/remotes\/}
if [[ -n ${remote} ]] ; then
hook_com[branch]="${hook_com[branch]} [${remote}]"
fi
}
declare -U path
function zcompile-many() {
local f
for f; do zcompile -R -- "$f".zwc "$f"; done
}
zcompile-many ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions/{zsh-autosuggestions.zsh,src/**/*.zsh}
zcompile-many ~/zsh-async.git/v1.8.5/async.zsh
# zinit light-mode for \
# zdharma-continuum/zinit-annex-as-monitor \
# zdharma-continuum/zinit-annex-bin-gem-node \
# zdharma-continuum/zinit-annex-patch-dl \
# zdharma-continuum/zinit-annex-rust
# plugins=(git evalcache fast-syntax-highlighting autojump virtualenv virtualenvwrapper rust docker zsh-autosuggestions zsh-kubectl-prompt kubectl docker-compose vagrant golang zsh-prompt-benchmark)
bindkey "
|