7 ms·
Fun fact: if you don't want to put a command in history, prefix it with a space. This works in many shells.
by timvisee 3y ago
Fun fact: if you don't want to put a command in history, prefix it with a space. This works in many shells.
- LaputanMachine 3y agoThis feature can also be be enabled in macOS by adding the following line to ~/.zshrc: setopt HIST_IGNORE_SPACE
- JadeNB 3y 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 3y agoAnd if you're using fish shell, you can start a private session with fish --private or fish -P for short
- bruce343434 3y agoDoesn't work for bash
- unhammer 3y agoYou may need to enable it HISTCONTROL=ignorespace