Hacker News new | past | comments | ask | show | jobs | submit login

Just put a space before you execute the command, then it doesn't get saved in history. Alternatively, delete it from your history file as the other commenter suggests.



I don't have a box to test this on right now, but you might have to set HISTCONTROL=ignorespace for that to work.


At least under ZSH (on Ubuntu), I don't appear to have the HISTCONTROL environment variable set and yet it still ignores anything prepended with a space.




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

Search: