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

tmuxp.workspace.loader.expand

Python
  • Python
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust Unavailable
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

API reference · Markdown

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]
function [source]
function [source]
tmuxp.workspace.loader.expand

Resolve workspace variables and expand shorthand style / inline properties.

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

Esc

Type to search.