| 15 | } |
| 16 | |
| 17 | export function tmuxStart(options: TmuxStartOptions): string { |
| 18 | const args: string[] = [ |
| 19 | `${SCRIPTS_DIR}/tmux-start.sh`, |
| 20 | '--command', |
| 21 | options.command, |
| 22 | '--plain', |
| 23 | ] |
| 24 | if (options.name) args.push('--name', options.name) |
| 25 | if (options.width) args.push('--width', String(options.width)) |
| 26 | if (options.height) args.push('--height', String(options.height)) |
| 27 | if (options.waitSeconds !== undefined) |
| 28 | args.push('--wait', String(options.waitSeconds)) |
| 29 | |
| 30 | return execFileSync('bash', args, EXEC_OPTIONS).trim() |
| 31 | } |
| 32 | |
| 33 | export function tmuxSend( |
| 34 | sessionName: string, |