Skip to content

Instantly share code, notes, and snippets.

@hmidani-abdelilah
Forked from matthewmccullough/.zshrc
Created February 26, 2022 18:56
Show Gist options
  • Save hmidani-abdelilah/b07157ef8c8bd4f9d87b474ce182b16d to your computer and use it in GitHub Desktop.
Save hmidani-abdelilah/b07157ef8c8bd4f9d87b474ce182b16d to your computer and use it in GitHub Desktop.
A configuration to maintain history across sessions and share it across terminals in ZShell
##############################################################################
# History Configuration
##############################################################################
HISTSIZE=5000 #How many lines of history to keep in memory
HISTFILE=~/.zsh_history #Where to save history to disk
SAVEHIST=5000 #Number of history entries to save to disk
#HISTDUP=erase #Erase duplicates in the history file
setopt appendhistory #Append history to the history file (no overwriting)
setopt sharehistory #Share history across terminals
setopt incappendhistory #Immediately append to the history file, not just when a term is killed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment