I just installed oh-my-zsh for the first time. I just want to know how can I modify the number of past commands that are remembered in history? Where can I set this setting?


You can set the size of the history file zsh uses with the SAVEHIST variable. just put a line in your .zshrc (found in your home directory) like SAVEHIST=n to save up to n commands in your history (replacing n with a number of course).

By default, I think that both zsh and oh-my-zsh aleady has a line in your .zshrc that assignes SAVEHIST, so just change the number to one of your liking.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.