(ctx, commands=None)
return [lookup[name] for name in names if name in lookup]
Return list of used commands.
Return list of used commands.
Return list of used commands .
def _filter_commands(ctx, commands=None):
    """Return list of used commands."""
    lookup = getattr(ctx.command, 'commands', {})
    if not lookup and isinstance(ctx.command, click.MultiCommand):
        lookup = _get_lazyload_commands(ctx.command)

    if commands is None:
        return sorted(lookup.values(), key=lambda item: item.name)

    names = [name.strip() for name in commands.split(',')]
    return [lookup[name] for name in names if name in lookup]
def _filter_commands ( ctx , commands = None ) : lookup = getattr ( ctx . command , 'commands' , { } ) if not lookup and isinstance ( ctx . command , click . MultiCommand ) : lookup = _get_lazyload_commands ( ctx . command ) if commands is None : return sorted ( lookup . values ( ) , key = lambda item : item . name ) names = [ name . strip ( ) for name in commands . split ( ',' ) ] return [ lookup [ name ] for name in names if name in lookup ]