Function
isPaneRunningCommand
(sessionName: string, pane: PaneInfo)
Source from the content-addressed store, hash-verified
| 392 | |
| 393 | /** Count panes in a window */ |
| 394 | function countPanes(sessionName: string, windowTarget: string | number): number { |
| 395 | try { |
| 396 | const output = execSync( |
| 397 | `tmux list-panes -t ${sessionName}:${windowTarget} -F "#{pane_index}"`, |
| 398 | { encoding: 'utf-8' } |
| 399 | ).trim(); |
| 400 | return output === '' ? 0 : output.split('\n').length; |
| 401 | } catch { |
| 402 | return 0; |
| 403 | } |
| 404 | } |
| 405 | |
| 406 | type PaneInfo = { windowIndex: number; paneIndex: number }; |
| 407 | |
| 408 | /** |
Tested by
no test coverage detected