Merge branch 'main' of git.hserve.win:Mihit/ZSH-Config
This commit is contained in:
@@ -1,23 +1,32 @@
|
|||||||
#Add VCS
|
#Add VCS
|
||||||
autoload -Uz vcs_info
|
autoload -Uz vcs_info add-zsh-hook
|
||||||
|
|
||||||
precmd_vcs_info() {
|
precmd_vcs_info() {
|
||||||
vcs_info
|
vcs_info
|
||||||
}
|
}
|
||||||
|
|
||||||
precmd_functions+=( precmd_vcs_info )
|
add-zsh-hook precmd precmd_vcs_info
|
||||||
setopt prompt_subst
|
setopt prompt_subst
|
||||||
|
|
||||||
# Set up the prompt
|
# Set up the prompt
|
||||||
|
|
||||||
autoload -Uz promptinit
|
|
||||||
promptinit
|
|
||||||
|
|
||||||
PROMPT='%F{cyan}%n%f%F{green}@%m%f: %F{yellow}%~%f %F{red}${vcs_info_msg_0_}%f%# '
|
PROMPT='%F{cyan}%n%f%F{green}@%m%f: %F{yellow}%~%f %F{red}${vcs_info_msg_0_}%f%# '
|
||||||
zstyle ':vcs_info:git:*' formats '[%b] '
|
zstyle ':vcs_info:git:*' formats '[%b] '
|
||||||
zstyle ':vcs_info:*' check-for-changes true
|
zstyle ':vcs_info:git:*' actionformats '[%b|%a] '
|
||||||
|
|
||||||
setopt histignorealldups sharehistory
|
HISTFILE=$HOME/.zsh_history
|
||||||
|
HISTSIZE=100000
|
||||||
|
SAVEHIST=100000
|
||||||
|
|
||||||
|
setopt APPEND_HISTORY
|
||||||
|
setopt SHARE_HISTORY
|
||||||
|
setopt INC_APPEND_HISTORY
|
||||||
|
setopt HIST_IGNORE_ALL_DUPS
|
||||||
|
setopt HIST_IGNORE_SPACE
|
||||||
|
setopt HIST_REDUCE_BLANKS
|
||||||
|
setopt HIST_FIND_NO_DUPS
|
||||||
|
setopt HIST_SAVE_NO_DUPS
|
||||||
|
setopt HIST_VERIFY
|
||||||
|
|
||||||
#Alias
|
#Alias
|
||||||
alias ..='cd ..'
|
alias ..='cd ..'
|
||||||
@@ -38,7 +47,12 @@ HISTFILE=~/.zsh_history
|
|||||||
|
|
||||||
# Use modern completion system
|
# Use modern completion system
|
||||||
autoload -Uz compinit
|
autoload -Uz compinit
|
||||||
compinit
|
|
||||||
|
if [[ ! -f ~/.zcompdump ]]; then
|
||||||
|
compinit
|
||||||
|
else
|
||||||
|
compinit -C
|
||||||
|
fi
|
||||||
|
|
||||||
zstyle ':completion:*' rehash true
|
zstyle ':completion:*' rehash true
|
||||||
|
|
||||||
@@ -46,22 +60,19 @@ zstyle ':completion:*' auto-description 'specify: %d'
|
|||||||
zstyle ':completion:*' completer _expand _complete _correct _approximate
|
zstyle ':completion:*' completer _expand _complete _correct _approximate
|
||||||
zstyle ':completion:*' format 'Completing %d'
|
zstyle ':completion:*' format 'Completing %d'
|
||||||
zstyle ':completion:*' group-name ''
|
zstyle ':completion:*' group-name ''
|
||||||
zstyle ':completion:*' menu select=2
|
zstyle ':completion:*' menu select
|
||||||
eval "$(dircolors -b)"
|
eval "$(dircolors -b)"
|
||||||
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
|
||||||
zstyle ':completion:*' list-colors ''
|
|
||||||
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
|
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
|
||||||
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
|
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
|
||||||
zstyle ':completion:*' menu select=long
|
|
||||||
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
|
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
|
||||||
zstyle ':completion:*' use-compctl false
|
|
||||||
zstyle ':completion:*' verbose true
|
zstyle ':completion:*' verbose true
|
||||||
|
|
||||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
||||||
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
||||||
|
|
||||||
#Set Terminal Title
|
zstyle ':completion:*' use-cache on
|
||||||
print -Pn "\e]0;%n@%m\a"
|
zstyle ':completion:*' cache-path ~/.cache/zsh
|
||||||
|
|
||||||
#Key-Bindings
|
#Key-Bindings
|
||||||
# Make sure that the terminal is in application mode when zle is active, since
|
# Make sure that the terminal is in application mode when zle is active, since
|
||||||
@@ -184,3 +195,9 @@ bindkey '\C-x\C-e' edit-command-line
|
|||||||
# file rename magick
|
# file rename magick
|
||||||
bindkey "^[m" copy-prev-shell-word
|
bindkey "^[m" copy-prev-shell-word
|
||||||
|
|
||||||
|
setopt AUTO_CD
|
||||||
|
setopt AUTO_PUSHD
|
||||||
|
setopt PUSHD_IGNORE_DUPS
|
||||||
|
setopt EXTENDED_GLOB
|
||||||
|
setopt NO_BEEP
|
||||||
|
setopt INTERACTIVE_COMMENTS
|
||||||
Reference in New Issue
Block a user