Delete specific line from Oh-My-Zsh history

Sten Kin picture Sten Kin · Mar 31, 2014 · Viewed 45.5k times · Source

I'd like to remove a specific entry in my zsh history. I'm using oh-my-zsh.

Oh-my-zsh uses fc instead of history, which doesn't have the -d command (known bug). I've tried looking for the ~/.zhistory but that doesn't exist. How can I go about finding the location of the history file and remove the entry?

Answer

Amrit Dhungana picture Amrit Dhungana · Mar 31, 2014

You are looking in wrong File. Look at ~/.zsh_history not ~/.zhistory To view in which file your history is save

echo $HISTFILE

And

rm $HISTFILE