Extract the interesting bits from shell history

Latest on Hackage:0.0.1

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD3 licensed by Max Rabkin
Maintained by max.rabkin@gmail.com

Historian extracts interesting commands from your shell history and adds them to
a text file. "Interesting" means not matching any regular expression in the
file. This allows one to keep a textual "database" of commands.

Never again say "I wish I remembered what arguments to give wibble to make it
flibber the gibbet" three months after you looked it up.


WARNING: when historian is run, it truncates ~/.bash_history

When you run historian, it looks for lines in ~/interesting_history that
starts with start with a greater-than symbol. These lines are interpreted as
regexes. It then looks in ~/.bash_history for lines that don't match any of
the regexes, appends them to ~/interesting_history and opens your favourite
editor to edit the file.

You can then generalise the commands into regexes so that subsequent runs of
historian will ignore similar ones. You can delete commands, but if they appear
in your history again, historian will again consider them "interesting" (it's
for this reason that historian truncates the history after it runs).

Some of the regexes will inevitably be uninteresting, but you should generalise
them so that they don't show up again. Interesting commands should be
categorised and described, so that you can refer to them later.

An example interesting_history is contained in the EXAMPLE file.
comments powered byDisqus