Workspace ManagerstableAPI Reference

Choose documentation 3

stable

Current version

stable
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

tmuxp.workspace.finders.find_workspace_file

tmuxp.workspace.finders.find_workspace_file ( workspace_file: StrPath, workspace_dir: StrPath | None = None, ) → str

Return the real config path or raise an exception.

Description#

If workspace file is directory, scan for .tmuxp.{yaml,yml,json} in directory. If one or more found, it will warn and pick the first.

If workspace file is ".", "./" or None, it will scan current directory.

If workspace file is has no path and only a filename, e.g. "my_workspace.yaml" it will search workspace dir.

If workspace file has no path and no extension, e.g. "my_workspace", it will scan for file name with yaml, yml and json. If multiple exist, it will warn and pick the first.

Parameters
Returns

str Resolved absolute path to workspace file.

Raises
Esc

Type to search.

Reference preview Open reference