4 ms·
Or just: FOO=bar my_cmd That's the same but with a leading space, to prevent 'bar' from showing up in your histfile.
by mappu 9y ago
Or just:
FOO=bar my_cmd
That's the same but with a leading space, to prevent 'bar' from showing up in your histfile.
- karlding 9y agoOn bash, this assumes that $HISTCONTROL is set to ignoreboth [0]. This is in the default ~/.bashrc on Ubuntu, but I can't speak about other distros. I don't use zsh, but I believe the equivalent is $HIST_IGNORE_SPACE [1]. [0] https://linux.die.net/man/1/bash https://linux.die.net/man/1/bash [1] https://unix.stackexchange.com/questions/6094/is-there-any-way-to-keep-a-command-from-being-added-to-your-history https://unix.stackexchange.com/questions/6094/is-there-any-w...