dbarnett/python-selfcompletion — pull request #1 by aaronj1335 (2013-02-19 23:49:56+00:00)
Title: add support for subparsers

this change delegates `get_valid_next_words()` to a subparser where
appropriate. example usage:

from selfcompletion import SelfCompletingArgumentParser
parser = SelfCompletingArgumentParser()
subparsers = parser.add_subparsers()
subparser = subparsers.add_parser('foo',
parser_class=SelfCompletingArgumentParser)
subparser.add_argument('--something')

unit test included.