diff --git a/zshrc b/zshrc index ec7808a..9235f2d 100644 --- a/zshrc +++ b/zshrc @@ -1,23 +1,32 @@ #Add VCS -autoload -Uz vcs_info +autoload -Uz vcs_info add-zsh-hook precmd_vcs_info() { - vcs_info + vcs_info } -precmd_functions+=( precmd_vcs_info ) +add-zsh-hook precmd precmd_vcs_info setopt prompt_subst # 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%# ' 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 ..='cd ..' @@ -38,7 +47,12 @@ HISTFILE=~/.zsh_history # Use modern completion system autoload -Uz compinit -compinit + +if [[ ! -f ~/.zcompdump ]]; then + compinit +else + compinit -C +fi zstyle ':completion:*' rehash true @@ -46,22 +60,19 @@ zstyle ':completion:*' auto-description 'specify: %d' zstyle ':completion:*' completer _expand _complete _correct _approximate zstyle ':completion:*' format 'Completing %d' zstyle ':completion:*' group-name '' -zstyle ':completion:*' menu select=2 +zstyle ':completion:*' menu select eval "$(dircolors -b)" -zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} -zstyle ':completion:*' list-colors '' +zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} 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:*' menu select=long zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s -zstyle ':completion:*' use-compctl false zstyle ':completion:*' verbose true 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' -#Set Terminal Title -print -Pn "\e]0;%n@%m\a" +zstyle ':completion:*' use-cache on +zstyle ':completion:*' cache-path ~/.cache/zsh #Key-Bindings # 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 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 \ No newline at end of file