'Add one subcommand to this parser.'

def add_command(self, name):

    name = spack.cmd.get_python_name(name)
    if (not hasattr(self, 'subparsers')):
        if (self._actions[(-1)].dest == 'command'):
            self._remove_action(self._actions[(-1)])
        self.subparsers = self.add_subparsers(metavar='COMMAND', dest='command')
    module = spack.cmd.get_module(name)
    cmd_name = name.replace('_', '-')
    subparser = self.subparsers.add_parser(cmd_name, help=module.description, description=module.description)
    module.setup_parser(subparser)
    return module
