from dataclasses import dataclass, fields

def repr_alias(alias: str="",attr_name=True):
    def decorator(cls):
        def __repr__(self):
            if attr_name:
                items = "-".join(
                    f"{f.name}-{getattr(self, f.name)!r}"
                    for f in fields(self) if f.repr
                )
            else:
                items = "-".join(
                    f"{getattr(self, f.name)!r}"
                    for f in fields(self)  if f.repr
                )
            return f"{alias}[{items}]"
        cls.__repr__ = __repr__
        return cls
    return decorator