Get the current status of the fragments repository, limited to FILENAME(s) if specified.
    Limit output to files with status STATUS, if present.

def status(*args):
    """
    Get the current status of the fragments repository, limited to FILENAME(s) if specified.
    Limit output to files with status STATUS, if present.
    """
    parser = argparse.ArgumentParser(prog="%s %s" % (__package__, status.__name__), description=status.__doc__)
    parser.add_argument('FILENAME', help="files to show status for", nargs="*", default=['.'])
    parser.add_argument('-l', '--limit', type=str, dest="STATUS", default='MDAE ', action="store", help="limit to files in STATUS")
    args = parser.parse_args(args)

    config = FragmentsConfig()
    yield "%s configuration version %s.%s.%s" % ((__package__,) + config['version'])
    yield "stored in %s" % config.directory
    for s, curr_path in _iterate_over_files(args.FILENAME, config, statuses=args.STATUS):
        yield _status_to_color.get(s, str)('%s\t%s' % (s, os.path.relpath(curr_path)))