Y
Hacker News
new
|
ask
|
show
|
jobs
by
brianshaler
4151 days ago
Depending on your system and configuration, couldn't you prepend a space to the command to prevent it from being saved into your history?
edit: Looks like vacri mentioned this in a peer comment an hour ago. Whoops!
1 comments
nmjohn
4151 days ago
That works if you are using bash, but if you are, for example, using zsh, you would first have to run "setopt histignorespace" which would enable hiding lines prepended with a space in the history (it's off by default).
link