Skip to content

Instantly share code, notes, and snippets.

@zero-tuesday
Created September 24, 2020 06:44
Show Gist options
  • Save zero-tuesday/4d35a3cd99b25a7dfa38a724748fd78e to your computer and use it in GitHub Desktop.
Save zero-tuesday/4d35a3cd99b25a7dfa38a724748fd78e to your computer and use it in GitHub Desktop.
zsh config
PROMPT="🔮 %B%F{magenta}[%F{green}%2~%F{magenta}]%f:%b "
HISTFILE=${ZDOTDIR:-$HOME}/.zsh_history
SAVEHIST=5000
HISTSIZE=2000
export CLICOLOR=1
export EDITOR=vim
# include more info like like in history file
setopt EXTENDED_HISTORY
# share history across multiple zsh sessions
setopt SHARE_HISTORY
# append to history
setopt APPEND_HISTORY
# adds commands as they are typed, not at shell exit
setopt INC_APPEND_HISTORY
# expire duplicates first
setopt HIST_EXPIRE_DUPS_FIRST
# do not store duplications
setopt HIST_IGNORE_DUPS
#ignore duplicates when searching
setopt HIST_FIND_NO_DUPS
# removes blank lines from history
setopt HIST_REDUCE_BLANKS
# verify history substitution
setopt HIST_VERIFY
# Offer to correct commands
setopt CORRECT
setopt CORRECT_ALL
# auto completion stuff
autoload -Uz compinit && compinit
# partial completion suggestions
zstyle ':completion:*' list-suffixes
zstyle ':completion:*' expand prefix suffix
# Git Stuff
autoload -Uz vcs_info
precmd_vcs_info() { vcs_info }
precmd_functions+=( precmd_vcs_info )
setopt prompt_subst
RPROMPT=\$vcs_info_msg_0_
zstyle ':vcs_info:git:*' formats '%F{red}🌿 %b%f'
zstyle ':vcs_info:*' enable git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment