From 98f6c5fd9300e6b65840a9a9ac5e7e912ec164a9 Mon Sep 17 00:00:00 2001 From: Mihit Mittal Date: Sun, 21 Jun 2026 14:58:09 +0000 Subject: [PATCH 1/2] removed set terminal title, will be reimplimented later --- zshrc | 3 --- 1 file changed, 3 deletions(-) diff --git a/zshrc b/zshrc index ade60b3..722db67 100644 --- a/zshrc +++ b/zshrc @@ -55,9 +55,6 @@ 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" - #Key-Bindings # Make sure that the terminal is in application mode when zle is active, since # only then values from $terminfo are valid From c2dbefa75b1a8cdb313ec01d14f5631ab5ca1779 Mon Sep 17 00:00:00 2001 From: Mihit Mittal Date: Sun, 21 Jun 2026 15:14:18 +0000 Subject: [PATCH 2/2] added changes and optimisation of start time --- zshrc | 48 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/zshrc b/zshrc index 722db67..e8506cd 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 ..' @@ -33,7 +42,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 @@ -41,20 +55,20 @@ 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' +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 # only then values from $terminfo are valid @@ -176,3 +190,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