# tmuxp.workspace.loader.expand

- **Module:** tmuxp.workspace.loader
- **Package:** tmuxp
- **Language:** Python
- **Kind:** function
- **Source:** https://github.com/tmux-python/tmuxp/blob/153acdf6ff1268b14d3d03ed488f545a7123c8f1/src/tmuxp/workspace/loader.py#L68
- **Page:** https://libtmux.org/en/py/latest/workspace/reference/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.

This is necessary to keep the code in
:class:`~tmuxp.workspace.builder.classic.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

- `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
