What does this option in Terminal do?
It seems to have no effect on anything.
Essentially, this option prevents other applications (including things like TextExpander) from "listening in" on what you are typing. By preventing other background processes from recording or accessing your keystrokes, you are ensuring they cannot be logged or monitored, eg. by a simple keylogger, or another program running with normal permissions for potentially malicious purposes.
There's a great answer about it on the Security Stackexchange
"Secure Keyboard Entry" maps to the
EnableSecureEventInputfunction whose concept is described here. Basically, applications don't access the hardware themselves; they obtain events (e.g. about key strokes) from the operating system. Some elements in the OS decides what application gets what events, depending on its access rights and GUI state (there are details depending on which application is "in the foreground")....
HISTCONTROLto eitherignorespaceorignoreboth. For zsh runsetopt HIST_IGNORE_SPACE. Then, once that's done, prefix the command you don't want in history with a space. E.g.,⎵blah --password secret_password. Then open an issue with the program for not having a way to interactively enter your password in a hidden prompt. – Captain Man Jan 22 '20 at 18:23