tmuxp.workspace.finders.find_local_workspace_files
- tmuxp.workspace.finders.find_local_workspace_files ( start_dir: pathlib
.Path | str | None = None, stop_at_home: bool = True, ) list[pathlib.Path ] -
Find .tmuxp.* files by traversing upward from start directory.
Description#
Searches the start directory and all parent directories up to (but not past):
- User home directory (when stop_at_home=True)
- Filesystem root
Examples#
>>> import tempfile>>> import pathlib>>> with tempfile.TemporaryDirectory() as tmpdir:... home = pathlib.Path(tmpdir)... project = home / "project"... project.mkdir()... _ = (project / ".tmuxp.yaml").write_text("session_name: test")... # Would find .tmuxp.yaml in project dir... len(find_local_workspace_files(project, stop_at_home=False)) >= 0True- Parameters
-
-
start_dir(pathlib.Path | str | None) # – Directory to start searching from. Defaults to current working directory. -
stop_at_home(bool) # – If True, stops traversal at user home directory. Default True.
-
- Returns
-
list[pathlib.Path] List of workspace file paths found, ordered from closest to farthest.