@hackage historian0.0

Extract the interesting bits from shell history

  • Categories

    • License

      BSD-3-Clause

    • Maintainer

      max.rabkin@gmail.com

    • Versions

      • 0.0.1 Sat, 13 Jun 2009
      • 0.0 Tue, 9 Jun 2009

    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.