File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -387,6 +387,36 @@ pane during creation.
387387
388388```
389389
390+
391+ ## Multi-line commands
392+
393+ You can use YAML's multiline syntax to easily split multiple
394+ commands into the same shell command: https://stackoverflow.com/a/21699210
395+
396+ ``` {code-block} yaml
397+
398+ session_name: my project
399+ shell_command_before:
400+ - >
401+ [ -d `.venv/bin/activate` ] &&
402+ source .venv/bin/activate &&
403+ reset
404+ - sleep 1
405+ windows:
406+ - window_name: first window
407+ layout: main-horizontal
408+ focus: true
409+ panes:
410+ - focus: True
411+ - blank
412+ - >
413+ poetry run ./manage.py migrate &&
414+ npm -C js run start
415+ - poetry run ./manage.py runserver
416+ options:
417+ main-pane-height: 35
418+ ```
419+
390420## Bootstrap project before launch
391421
392422You can use ` before_script ` to run a script before the tmux session
You can’t perform that action at this time.
0 commit comments