Run incognito/private commands for Bash and Zsh
2020年12月8日
Bash
Simply put a space before the command and it won't be saved to ~/.bash\_history. E.g. qrencode -o out.png "Some secret text"
Zsh
Enable the following option to be able to run private commands by adding a space before and prevent it from being saved to ~/.zsh\_history.
setopt HIST_IGNORE_SPACE