Zsh shell history getting cleared automatically while using gnome-terminal(.zhistory)

I just checked again found and found ~/.zhistory. So it’s obvious that it was my mistake, not yours.

Double check that the $HISTFILE environment variable exists and is correct.

echo $HISTFILE

Then check if the file exists and it’s permissions are correct:

$ stat $(echo $HISTFILE)

File: /home/mirdarthos/.zhistory
Size: 12086           Blocks: 24         IO Block: 4096   regular file
Device: 10302h/66306d   Inode: 5285510     Links: 1
Access: (0600/-rw-------)  Uid: ( 1000/mirdarthos)   Gid: ( 1000/mirdarthos)
Access: 2021-01-13 08:56:31.657668465 +0200
Modify: 2021-01-13 09:11:08.767260716 +0200
Change: 2021-01-13 09:11:08.767260716 +0200
Birth: 2021-01-13 08:56:31.657668465 +0200

Edit:
I just found this page regarding zsh history. According to that:

History accepts a range in zsh entries as [first] [last] arguments, so to get them all run history 0 .

To get the zsh help (at least with mind) type Alt-h over the history command and this will bring up the help for built-ins.