def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("/rvim"),
                    event.deep_get("Image", default="").endswith("/vi"),
                    event.deep_get("Image", default="").endswith("/vim"),
                    event.deep_get("Image", default="").endswith("/vimdiff"),
                ]
            ),
            any(
                [
                    " --cmd " in event.deep_get("CommandLine", default=""),
                    " -c" in event.deep_get("CommandLine", default=""),
                ]
            ),
            any(
                [
                    ":!/" in event.deep_get("CommandLine", default=""),
                    ":!$" in event.deep_get("CommandLine", default=""),
                    ":!.." in event.deep_get("CommandLine", default=""),
                    ":lua " in event.deep_get("CommandLine", default=""),
                    ":py " in event.deep_get("CommandLine", default=""),
                    ":shell" in event.deep_get("CommandLine", default=""),
                    "/bin/bash" in event.deep_get("CommandLine", default=""),
                    "/bin/dash" in event.deep_get("CommandLine", default=""),
                    "/bin/fish" in event.deep_get("CommandLine", default=""),
                    "/bin/sh" in event.deep_get("CommandLine", default=""),
                    "/bin/csh" in event.deep_get("CommandLine", default=""),
                    "/bin/ksh" in event.deep_get("CommandLine", default=""),
                    "/bin/zsh" in event.deep_get("CommandLine", default=""),
                    "/bin/tmux" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
