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.loader.expand

tmuxp.workspace.loader.expand ( workspace_dict: dict[str, t.Any], cwd: pathlib.Path | str | None = None, parent: t.Any | None = None, ) → dict[str, t.Any]

Resolve workspace variables and expand shorthand style / inline properties.

Description#

This is necessary to keep the code in ClassicWorkspaceBuilder clean and also allow for neat, short-hand "sugarified" syntax.

As a simple example, internally, tmuxp expects that workspace options like shell_command are a list (array):

'shell_command': ['htop']

tmuxp workspace allow for it to be simply a string:

'shell_command': 'htop'

ConfigReader will load JSON/YAML files into python dicts for you.

Parameters
Returns

dict

Discussed in Python workspace internal API

Esc

Type to search.

Reference preview Open reference