rapid7/metasploit-framework — pull request #820 by kernelsmith (2012-09-21 20:58:52+00:00)
Title: implements a simple grep command for msfconsole

example usage:
grep https show payloads
grep -i iPhone show exploits
grep -i sp3 show targets
grep '^[\s]*generic/c' show payloads

Usage: grep [options] pattern cmd

Grep the results of a console command (similar to Linux grep command)

OPTIONS:
-c Only print a count of matching lines.
-h Help banner.
-i Ignore case.
-m Stop after arg matches.
-v Invert match.

I've always wanted to add this... esp for with the show command, but it works on any command