import re


def rule(event):
    if all(
        [
            any(
                [
                    re.match(
                        r"\\w+`(?:\\w+|-|.)`[\\w+|\\s]", event.deep_get("CommandLine", default="")
                    ),
                    re.match(
                        r"\"(?:\\{\\d\\})+\"\\s*-f", event.deep_get("CommandLine", default="")
                    ),
                    re.match(
                        r"(?i)\\$\\{`?e`?n`?v`?:`?p`?a`?t`?h`?\\}",
                        event.deep_get("CommandLine", default=""),
                    ),
                ]
            ),
            not "${env:path}" in event.deep_get("CommandLine", default=""),
        ]
    ):
        return True
    return False
