help="Limit the comments output to ones older than a specific date.")
parser.add_argument("--author", metavar="PATTERN", action="append",
help="Limit the comments output to ones that were created by user matching PATTERN. Can be used multiple times.")
+parser.add_argument("--to", metavar="PATTERN", action="append",
+ help="Limit the comments output to ones that were addressed to user matching PATTERN. Can be used multiple times.")
class CFormatter(string.Formatter):
def __init__(self):
for pattern in args.author:
cmd += ["--author", pattern]
+if args.to:
+ for pattern in args.to:
+ cmd += ["--grep", "^To: .*" + pattern]
+
if args.extended_regexp:
cmd += ["--extended-regexp"]