tmuxp.workspace.loader.expand
Python
- Python
- Ruby Unavailable
- Lua Unavailable
- TypeScript Unavailable
- Rust Unavailable
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
-
Resolve workspace variables and expand shorthand style / inline properties.
This is necessary to keep the code in
ClassicWorkspaceBuilderclean and also allow for neat, short-hand "sugarified" syntax.As a simple example, internally, tmuxp expects that workspace options like
shell_commandare 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
-
-
workspace_dict ( dict[str, t.Any] ) – the tmuxp workspace for the session
-
cwd ( pathlib.Path | str | None ) – directory to expand relative paths against. should be the dir of the workspace directory.
-
parent ( t.Any | None ) – (used on recursive entries) start_directory of parent window or session object.
-
- Returns
-
dict
Discussed in Python workspace internal API