def get_config_name(self, action, name=None):
_name = None<EOL>if name is None:<EOL><INDENT>if '<STR_LIT:.>' in action:<EOL><INDENT>action, name = action.rsplit('<STR_LIT:.>', <NUM_LIT:1>)<EOL><DEDENT>else:<EOL><INDENT>_name = '<STR_LIT>'<EOL>name = action<EOL><DEDENT><DEDENT>if _name is None:<EOL><INDENT>if isinstance(action, basestring):<EOL><INDENT>action = self.get_action(action)<EOL><DEDENT>_name = action.argdeco_name<EOL><DEDENT>logger.debug("<STR_LIT>", _name)<EOL>config_name = Undefined<EOL>while True:<EOL><INDENT>logger.debug("<STR_LIT>", repr(_name), repr(name))<EOL>if _name in self.config_map:<EOL><INDENT>if name in self.config_map[_name]:<EOL><INDENT>config_name = self.config_map[_name][name]<EOL>if config_name is not None:<EOL><INDENT>if config_name.startswith('<STR_LIT:.>'):<EOL><INDENT>config_name = _name + config_name<EOL><DEDENT><DEDENT>break<EOL><DEDENT><DEDENT>if _name == '<STR_LIT>':<EOL><INDENT>break<EOL><DEDENT>if '<STR_LIT:.>' not in _name:<EOL><INDENT>_name = '<STR_LIT>'<EOL>continue<EOL><DEDENT>_name = _name.rsplit('<STR_LIT:.>', <NUM_LIT:1>)[<NUM_LIT:0>]<EOL><DEDENT>assert config_name is not Undefined, "<STR_LIT>" % name<EOL>return config_name<EOL>
get the name for configuration

        This returns a name respecting commands and subcommands.  So if you
        have a command name "index" with subcommand "ls", which has option
        "--all", you will pass the action for subcommand "ls"  and the options's
        dest name ("all" in this case), then this function will return
        "index.ls.all" as configuration name for this option.