Ejemplo n.º 1
0
 def print_template_candidates(for_cmd=None):
     templates = []
     if for_cmd:
         possible_command = commands.get_command_names_by_criteria(name=for_cmd, followed_by_template=True)
         if possible_command:
             templates = tools.list_template_for_command(for_cmd)
     else:
         templates = templates or commands.get_all_templates()
     if templates:
         templates.sort()
         print _("Candidate templates are: %s") % ", ".join(templates)
Ejemplo n.º 2
0
 def print_template_candidates(for_cmd=None):
     templates = []
     if for_cmd:
         possible_command = commands.get_command_names_by_criteria(
             name=for_cmd, followed_by_template=True)
         if possible_command:
             templates = tools.list_template_for_command(for_cmd)
     else:
         templates = templates or commands.get_all_templates()
     if templates:
         templates.sort()
         print _("Candidate templates are: %s") % ", ".join(templates)
Ejemplo n.º 3
0
def list_template_for_command(command_name):
    '''from the command_name, return all templates containing it'''
    return tools.list_template_for_command(command_name)