If you're running the command over and over, you might want to use your shell's history ignore feature. Lets say you have secret.server.com that you ssh to, FTP files to, etc. that you don't want any line that mentions secret.server.com saved:
bash you would set
zsh the parameter is called
HISTIGNORE can contain multiple patterns, separated with colons.
HISTORY_IGNORE specifies a single pattern but the pattern can contain alternatives, separated with pipes. Note that each pattern is matched against the full input line, so you might need to include a *. For example, the following will exclude
fortune from the history, but will store
With HISTIGNORE set, nothing matching the patterns you list will be saved to
.zsh_history and even the up arrow key, which normally recalls your previous command, won't work if it matches your pattern.