logoalt Hacker News

cocotolast Thursday at 12:31 PM1 replyview on HN

Prepend your command with a space and now your command is not saved in the history.


Replies

sltkrlast Thursday at 12:50 PM

That depends on the shell configuration.

On bash, you can achieve this by setting HISTCONTROL=ignorespace but that's not the default.