I like this idea but I know that I have accidentally entered my password or my password with a typo in it on the terminal on at least one occasion.
The only way round this that I can see is to grep out the password - but then my password (or a substring of it) is now in plaintext in my .zshrc/.bashrc
I can't think of a solution to this. Does anyone have anything?