# historian: Extract the interesting bits from shell history

[ bsd3, console, program ] [ Propose Tags ]

Extract interesting commands and add 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: historian truncates ~/.bash_history.

Versions 0.0, 0.0.1 base (>=3 && <5), containers (>=0.1 && <0.3), directory (==1.*), filepath (==1.*), process (==1.*), regex-compat (==0.92.*), regex-posix (==0.94.*) [details] BSD-3-Clause Max Rabkin max.rabkin@gmail.com Console by MaxRabkin at Tue Jun 9 20:59:42 UTC 2009 NixOS:0.0.1 historian 858 total (8 in the last 30 days) (no votes yet) [estimated by rule of succession] λ λ λ Docs not available All reported builds failed as of 2017-01-01 Hackage Matrix CI

#### Maintainer's Corner

For package maintainers and hackage trustees

[back to package description]
HISTORIAN
---------------------------------------------------------------------------------

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.