Skip to content

Commit 2428c85

Browse files
committed
docs(cli[load]): Document new flags and config templating
why: New load flags and config templating need user-facing documentation. what: - Document --here, --no-shell-command-before, --debug flags - Document config templating with --set KEY=VALUE
1 parent 87d5531 commit 2428c85

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

docs/cli/load.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,3 +253,57 @@ When progress is disabled, logging flows normally to the terminal and no spinner
253253
### Before-script behavior
254254

255255
During `before_script` execution, the progress bar shows a marching animation and a ⏸ status icon, indicating that tmuxp is waiting for the script to finish before continuing with pane creation.
256+
257+
## Here mode
258+
259+
The `--here` flag reuses the current tmux window instead of creating a new session. This is similar to teamocil's `--here` flag.
260+
261+
```console
262+
$ tmuxp load --here .
263+
```
264+
265+
When used, tmuxp builds the workspace panes inside the current window rather than spawning a new session.
266+
267+
## Skipping shell_command_before
268+
269+
The `--no-shell-command-before` flag skips all `shell_command_before` entries at every level (session, window, pane). This is useful for quick reloads when the setup commands (virtualenv activation, etc.) are already active.
270+
271+
```console
272+
$ tmuxp load --no-shell-command-before myproject
273+
```
274+
275+
## Debug mode
276+
277+
The `--debug` flag shows tmux commands as they execute. This disables the progress spinner and attaches a debug handler to libtmux's logger, printing each tmux command to stderr.
278+
279+
```console
280+
$ tmuxp load --debug myproject
281+
```
282+
283+
## Config templating
284+
285+
Workspace configs support Jinja2-style `{{ variable }}` placeholders. Pass values via `--set KEY=VALUE`:
286+
287+
```console
288+
$ tmuxp load --set project=myapp mytemplate.yaml
289+
```
290+
291+
Multiple variables can be passed:
292+
293+
```console
294+
$ tmuxp load --set project=myapp --set env=staging mytemplate.yaml
295+
```
296+
297+
In the config file, use double-brace syntax:
298+
299+
```yaml
300+
session_name: "{{ project }}"
301+
windows:
302+
- window_name: "{{ project }}-main"
303+
panes:
304+
- echo "Working on {{ project }}"
305+
```
306+
307+
```{note}
308+
Values containing `{{ }}` must be quoted in YAML to avoid parse errors.
309+
```

0 commit comments

Comments
 (0)