pry/pry — pull request #470 by golive (2012-02-10 22:36:01+00:00)
Title: Apply hist --tail or --head after --grep

`hist --grep pattern --tail N`

The behaviour of `--tail` and `--head` in `history` command combined with `--grep` is not what I expected. For me, the result of combine these two options should be "*the first/last N lines of history matching a pattern*" but not "*the lines mathing a pattern within the first/last N lines of history*". I think the first use case makes more sense and is more common.