def to_cmd_string(unquoted_str: str) -> str:
    """
    Add quotes around the string in order to make the command understand it's a string
    (useful with tricky symbols like & or white spaces):

    .. code-block:: python

        >>> # This str wont work in the terminal without quotes (because of the &)
        >>> pb_str = r"D:\Minab_4-DA&VHR\Minab_4-DA&VHR.shp"
        >>> to_cmd_string(pb_str)
        "\"D:\Minab_4-DA&VHR\Minab_4-DA&VHR.shp\""

    Args:
        unquoted_str (str): String to update

    Returns:
        str: Quoted string
    """
    if not isinstance(unquoted_str, str):
        unquoted_str = str(unquoted_str)

    cmd_str = unquoted_str
    if not unquoted_str.startswith('"'):
        cmd_str = '"' + cmd_str
    if not unquoted_str.endswith('"'):
        cmd_str = cmd_str + '"'
    return cmd_str