Le Livre d'Argent

what problems have you run into with history in your shell? so far I have these, what am I missing?

- screwing up a command & getting that stuck in the history.
- history getting truncated (would love more details about why this happened to you! was it HISTSIZE? something else?)
- can't access history from other open terminals
- accidentally putting (or not putting!) a space at the beginning of a command

(please only problems related to history, and let me know which shell you're using!)

A funny one: when the history grows over 1 million lines, Bash performances are degraded. Getting the output of the first command in a new shell takes some extra seconds until the history is reduced to a more reasonable size.

@b0rk Also history not being truncated or something like this. At least mksh is weird when it reaches HISTSIZE, but at least you can get history from other terminals using the same HISTFILE.
So periodically I end up doing a mv $HISTFILE "${HISTFILE}.pre-$(date -u +%FT%TZ)"

@vv221 @b0rk When using bash, having the line

export HISTFILE="/dev/null"

at the beginning of your ~/.bashrc prevent a lot of history issues. It might cause “not having history” issues to some people, thought.

replies
1
announces
0
likes
0

That would be a big problem for me, I rely on my history a lot ;)

CC: @b0rk@jvns.ca