You're viewing a comment by AltairIV and its responses.

AltairIV Permalink
May 23, 2010, 19:02

I just came across this post. Thanks for the useful summary.

But I'm quite surprised that there's no mention here of the HISTCONTROL variable, which controls the saving of duplicated and space-started lines. The available options (colon-separated) are:

ignorespace
(Don't save commands that begin with spaces, apparently equal to HISTIGNORE="[ ]*")

ignoredupes
(Don't save duplicated commands, equivalent to HISTIGNORE="&")

ignoreboth
(Combines the previous two options)

erasedupes
(Erase any previous occurrences of a command before saving)

I personally like the last one as it ensures that the most recent usage of the command is saved, rather than the oldest.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the word "disk": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.