Skip to content

Instantly share code, notes, and snippets.

@mendeza
Created March 18, 2022 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mendeza/fe679d3470a889c9cbe1690cf81b40d0 to your computer and use it in GitHub Desktop.
Save mendeza/fe679d3470a889c9cbe1690cf81b40d0 to your computer and use it in GitHub Desktop.
zshell config — first draft
# Z Shell Reference: https://zsh.sourceforge.io/Intro/intro_toc.html
# -----------------------------------------------------------------------------
# config location
XDG_CONFIG_HOME=~/.config
# Keep command history
# Search history with ctrl-R
# use !! to repeat last command
HISTFILE=${ZDOTDIR:-$HOME}/.zsh_history
# limit how many commands are stored in the session and in the history file
SAVEHIST=5000
HISTSIZE=2000
# 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
# removes blank lines from history
setopt HIST_REDUCE_BLANKS
#ignore duplicates when searching
setopt HIST_FIND_NO_DUPS
# Allows editing command after !!
setopt HIST_VERIFY
# correction
#setopt CORRECT
#setopt CORRECT_ALL
# no need to 'cd', just dir name
#setopt autocd
# vi commandline edit mode
bindkey -v
# basic color enabled
export TERM="xterm-256color" CLICOLOR=1
# -----------------------------------------------------------------------------
# Add git prompt and completion:
https://gist.github.com/mendeza/468230f6cb98be32716e220340e8f463
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment