tuple[str, list[str]]: The text extended by the longest common prefix of the matching sub-directories (and a slash if exactly one matches), and the names of all matches.
Examples
from pathlib import Pathfrom tempfile import TemporaryDirectoryfrom spotregen.gui.model import complete_pathwith TemporaryDirectory() as tmp:for name in ("alpha", "alpine", "beta"): (Path(tmp) / name).mkdir()print(complete_path(f"{tmp}/be")[0].replace(tmp, "<tmp>"))print(complete_path(f"{tmp}/al")[1])