I've reached the maximum 10K lines of commands in my zsh history file, but I want to store more commands.
So I set this, in my ~/.zshrc file:
export HISTFILE="$HOME/.zsh_history" export HISTSIZE=1000000000 export SAVEHIST=1000000000 setopt EXTENDED_HISTORY And I made sure to run source ~/.zshrc after editing this file.
But when I echo these variables, I get different results:
And when I close the terminal and open a new session, I can see that the number of commands in my history file is 10K:
How can I fix it so that I can store more than 10K commands in my ~/.zsh_history file?
Also, when I run wc -l < $HISTFILE, it gives me a number more than 10K:
What's going on?
1 Answer
I assume that this is not your entire .zshrc and that the variables are set somewhere else.
Make sure you're not using any other script that overwrites these variables, such as oh-my-zsh (example), and that you place your commands at the bottom of your config file.


