Untitled
unknown
sh
4 months ago
2.7 kB
5
No Index
HISTFILE=~/.zsh_history
HISTSIZE=100000
SAVEHIST=100000
setopt append_history inc_append_history share_history
# Completion
autoload -U compinit && compinit
zstyle ':completion:*' completer _extensions _complete _approximate
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path "~/.zcompcache"
zstyle ':completion:*' menu select=2
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}
# Git
autoload -Uz vcs_info
zstyle ':vcs_info:*' enable git svn
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:*' stagedstr ' '
zstyle ':vcs_info:*' unstagedstr ' '
# zstyle ':vcs_info:git*' formats " (%b)"
zstyle ':vcs_info:git*' formats $'%F{yellow}\Ue0b6%f%K{yellow}%F{black}\Ue0a0 %b%c%u%f%k%F{yellow}\Ue0b4%f'
# Key bindings
bindkey -e
bindkey "^[[3~" delete-char
bindkey "\e[A" history-beginning-search-backward
bindkey "\e[B" history-beginning-search-forward
# Color
alias ls='ls --color=auto -hv'
alias grep='grep --color=auto'
alias diff='diff --color=auto'
alias ip='ip -c=auto'
precmd () {
print -Pn "\e]2;%~\a";
vcs_info;
}
# Prompt
setopt prompt_subst
#PROMPT=' %(!.%F{red}%B%~%b%f.%F{blue}%B%~%b%f)%F{yellow}${vcs_info_msg_0_}%f %F{255}❯%f '
#RPROMPT='${vcs_info_msg_0_}%F{8}%*%f'
# Alternative Prompt
PR_LEFT=$'%F{white}\Ue0b6%f%F{0}%K{white}%(?.. \Ue00a) %T %k%f'
PR_RIGHT_B=$'%K{blue}%F{white}\Ue0bc%f%F{0} %2~ %f%k%F{blue}\Ue0b4%f'
PR_RIGHT_R=$'%K{red}%F{white}\Ue0bc%f%F{255} %2~ %f%k%F{red}\Ue0b4%f'
PROMPT=$'%(!.$PR_LEFT$PR_RIGHT_R.$PR_LEFT$PR_RIGHT_B) '
RPROMPT='${vcs_info_msg_0_}'
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/share/doc/pkgfile/command-not-found.zsh
# Syntax highlighting
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
ZSH_HIGHLIGHT_HIGHLIGHTERS+=(brackets)
(( ${+ZSH_HIGHLIGHT_STYLES} )) || typeset -A ZSH_HIGHLIGHT_STYLES
# Remove underlines
ZSH_HIGHLIGHT_STYLES[path]=none
ZSH_HIGHLIGHT_STYLES[path_prefix]=none
# Colors
#ZSH_HIGHLIGHT_STYLES[command]=fg=76,bold
ZSH_HIGHLIGHT_STYLES[precommand]=none,fg=28,bold
ZSH_HIGHLIGHT_STYLES[single-hyphen-option]=none,fg=202
ZSH_HIGHLIGHT_STYLES[double-hyphen-option]=none,fg=202
ZSH_HIGHLIGHT_STYLES[path]=fg=blue
#ZSH_HIGHLIGHT_STYLES[alias]=fg=blue,bold
#ZSH_HIGHLIGHT_STYLES[builtin]=fg=blue,bold
#ZSH_HIGHLIGHT_STYLES[function]=fg=blue,bold
#ZSH_HIGHLIGHT_STYLES[command]=fg=blue,boldEditor is loading...