Clear your cache often, but never your shell history.

CTRL + R is sacred.

@greenpete I can't count the number of times I've forgotten the specific syntax or flags of a command I typed a while back — and have had to use 'reverse-i-search' to quickly find it.

It's a life saver. A history size of 1 million is practically infinite.

FYI the following is in my '.zshrc' config file:

export HISTFILE=~/.zsh_history
export HISTSIZE=1000000
export SAVEHIST=1000000

@SciencePhysicist @oedmarap I see your point(s).
I don't administer servers anymore, but when I did, I felt better not leaving history in the machine.
And I'm just happier the less info' is left on a computer generally.

@greenpete Oh definitely, shell command history beyond Bash's default of 2000 lines is only applicable for desktop usage where Zsh is usually installed.

@oedmarap just start any commands you don't want to have in the history with a space character :) that's what I do in case I have to provide a password or something in the cli string.

@sotolf Ah yes! I forgot about that one, but it also requires adding this as well for commands with a preceding space:


I _think_ 'oh-my-zsh' does that automatically anyway. 🤔

@oedmarap I don't remember, but it's a nice feature to have at least :)

Sign in to participate in the conversation

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.