top | item 39077170

(no title)

timvisee | 2 years ago

Fun fact: if you don't want to put a command in history, prefix it with a space. This works in many shells.

discuss

order

LaputanMachine|2 years ago

This feature can also be be enabled in macOS by adding the following line to ~/.zshrc:

    setopt HIST_IGNORE_SPACE

JadeNB|2 years ago

> This feature can also be be enabled in macOS by adding the following line to ~/.zshrc:

> setopt HIST_IGNORE_SPACE

Except that I think it's called `histignorespace` (I haven't caught up with when and how much zsh cares about lowercased names), I think this is just about zsh, not about macOS specifically.

talhah|2 years ago

And if you're using fish shell, you can start a private session with fish --private or fish -P for short

bruce343434|2 years ago

Doesn't work for bash

unhammer|2 years ago

You may need to enable it

HISTCONTROL=ignorespace