def __call__(self, prefix, **kwargs):
if os.path.sep in prefix[<NUM_LIT:1>:]:<EOL><INDENT>prefix_dir = len(os.path.dirname(prefix) + os.path.sep)<EOL><DEDENT>else:<EOL><INDENT>prefix_dir = <NUM_LIT:0><EOL><DEDENT>completion = []<EOL>globbed = []<EOL>if "<STR_LIT:*>" not in prefix and "<STR_LIT:?>" not in prefix:<EOL><INDENT>if not prefix or prefix[-<NUM_LIT:1>] == os.path.sep:<EOL><INDENT>globbed.extend(glob(prefix + "<STR_LIT>"))<EOL><DEDENT>prefix += "<STR_LIT:*>"<EOL><DEDENT>globbed.extend(glob(prefix))<EOL>for x in sorted(globbed):<EOL><INDENT>if os.path.isdir(x):<EOL><INDENT>x += "<STR_LIT:/>"<EOL><DEDENT>completion.append(x[prefix_dir:])<EOL><DEDENT>return completion<EOL>
only called on non option completions