TIL: Slimming bash History

Jonas Brømsø - Jul 22 '18 - - Dev Community

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

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .