import re


def format_wsl_path(path: str) -> str:
    """Format windows path to the WSL equivalent

    Args:
        path (str): Windows path to convert

    Returns:
        str: WSL path, i.e. /mnt/c/my/path.sh
    """
    out_path = path.replace("\\", "/", -1)

    if re.search("^[a-z]:/", out_path, re.IGNORECASE):
        drive, _, rest = out_path.partition(":")
        out_path = f"/mnt/{drive.lower()}{rest}"

    return out_path