DEV Community


TIL: Slimming bash History

Computer programmer, runner, LEGO builder, powernapper, yakshaver and father of 2 boys all squeezed in the few hours available.
Updated on ・1 min read

Slimming bash History

If you want to have history from your shell with some more value ignoring all of the basic commands have a look at setting the environment variable: HISTIGNORE.

This is based on the example by Kenneth Geisshirt from his slidedeck available at SlideShare, with my own addition.

$ export HISTIGNORE="pwd:ls:ls -l:cd:clear"
Enter fullscreen mode Exit fullscreen mode

Source: SlideShare

Originally posted in my TIL collection

Discussion (0)