oh-my-zsh disable lib history.zsh
This question is old but anyway:
As you can use setopt
for setting options, you can use unsetopt
to unset them.
Just add
unsetopt share_history
after having sourced $ZSH/oh-my-zsh.sh
(and yes, it's really annoying ;) )
I mean, what is the RIGHT way. It is a lib not a plugin, if I edit the file I will not get updates for it.
The accepted answer is the easiest way, but it bears mentioning that oh-my-zsh lets you override any file or plugin you want by putting it in $ZSH_CUSTOM
- even stuff in lib. If you want to do more than just unsetopt share_history
you could run this:
# $ZSH_CUSTOM should already be automatically set to $ZSH/custom
# but you can customize the location in your ~.zshrc.
# ie: export ZSH_CUSTOM=~/.zsh_custom
# set up lib in omz custom area
mkdir -p $ZSH_CUSTOM/lib
# start off with omz version of the file
cp $ZSH/lib/history.zsh $ZSH_CUSTOM/lib/history.zsh
# edit that file and make it what you want
${EDITOR:-vim} $ZSH_CUSTOM/lib/history.zsh