Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> We don't want that in our shell history

This may be bash-only, but a space before the command excludes something from history too.



Only if you do something like this... export HISTCONTROL=ignorespace

Personally I like this which reduces noise in history from duplicate lines too. export HISTCONTROL=ignoreboth:erasedups


While you aren’t wrong, I haven’t seen a distro that defaults to bash not have this enabled by default for a long while.


I remember reading a very similar chain last year, trying it on my Proxmox host, and then being surprised it didn't work. I'm sure it's not the only modern distro this way, but I can't claimed to have tried very many after that.


I don't have debian handy to check at this moment, but the devuan machine (and devuan is typically debian config for the 99% of things that are not systemd) I have installed using mostly defaults, does not have it enabled by default.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: