timetrack/cli.py
def autocomplete_projects(ctx, args, incomplete):
    """Use the default driver to return a list of projects"""
    
    if ctx.obj is None:
        ctx.obj = init_context_obj()
        
    driver = ctx.obj['DRIVER']
    
    projects = driver.get_projects()
    
    options = [p for p in projects if  (len(incomplete) < 1) or (incomplete in p) ]
    
    return [f'"{option}"' if " " in option else option for option in options]
Use the default driver to return a list of projects
Use the default driver to return a list of projects
Use the default driver to return a list of projects
def autocomplete_projects(ctx, args, incomplete):
    if ctx.obj is None:
        ctx.obj = init_context_obj()
    driver = ctx.obj['DRIVER']
    projects = driver.get_projects()
    options = [p for p in projects if  (len(incomplete) < 1) or (incomplete in p) ]
    return [f'"{option}"' if " " in option else option for option in options]
def autocomplete_projects ( ctx , args , incomplete ) : if ctx . obj is None : ctx . obj = init_context_obj ( ) driver = ctx . obj [ 'DRIVER' ] projects = driver . get_projects ( ) options = [ p for p in projects if ( len ( incomplete ) < 1 ) or ( incomplete in p ) ] return [ f'"{option}"' if " " in option else option for option in options ]
Use the default driver to return a list of projects
Use the default driver to return a list of projects
"""Use the default driver to return a list of projects"""
ctx
args
incomplete