def show_cmd(*aliases):
    """Tag this given function as a show_cmd, and record its aliases."""

    def tag_aliases(func):
        """Attach all the aliases to the given function, but return the
        function itself. The function name, absent leading underscores and
        without a trailing '_cmd', is added by default."""
        name = func.__name__

        while name.startswith('_'):
            name = name[1:]

        if name.endswith('_cmd'):
            name = name[:-4]

        func.aliases = [name]
        for alias in aliases:
            func.aliases.append(alias)

        return func

    return tag_aliases