Created
January 20, 2011 00:00
-
-
Save matthewmccullough/787142 to your computer and use it in GitHub Desktop.
A configuration to maintain history across sessions and share it across terminals in ZShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################## | |
# 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 |
Thanks so much for this! I just divorced myself from the overhead of oh-my-zsh and was so confused by the history behavior I had come to think of as standard. Cheers to you, friend.
Here is the zplug entry:
zplug "plugins/history", from:oh-my-zsh
I just divorced myself from the overhead of oh-my-zsh
And I did exactly the same with zprezto, yay vanilla
I switched from bash to zsh
This totally made my day, thank you!
for zinit
users:
zinit snippet OMZP::history
Hey. I use someone else's .zshrc config and there were two lines in it. The first one was #setopt SHARE_HISTORY
and the second one was setopt sharehistory
, like in your snippet. Do you know what the difference would be between the two?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is also:
https://github.com/robbyrussell/oh-my-zsh/blob/master/lib/history.zsh
You can load with a zsh plugin manager such as zplug