Is there a straight forward way of deleting a single entry from the shell history in the "new" zsh shell?
I know fc does not support this and I can't even figure out where Apple now stashes the history file (to cope with multiple terminal sessions).
Best Answer
You can either use:
which usually opens TextEdit (or another default text editor - depends on your environment) and remove the line (and the last temporary line containing something like
: 1583100426:0;open $HISTFILE && exit
) and save the file ("Save Anyway").or - if you know some exclusive content of the line (in my example below PASSWORD):
Both commands won't remove unwanted lines in zsh history files in e.g. Time Machine backups!