* Parses the session ID from `it2 session split` output. * Format: "Created new pane: " * * NOTE: This UUID is only valid when splitting from a specific session * using the -s flag. When splitting from the "active" session, the UUID * may not be accessible if the split happened in a
(output: string)
| 48 | * may not be accessible if the split happened in a different window. |
| 49 | */ |
| 50 | function parseSplitOutput(output: string): string { |
| 51 | const match = output.match(/Created new pane:\s*(.+)/) |
| 52 | if (match && match[1]) { |
| 53 | return match[1].trim() |
| 54 | } |
| 55 | return '' |
| 56 | } |
| 57 | |
| 58 | /** |
| 59 | * Gets the leader's session ID from ITERM_SESSION_ID env var. |
no outgoing calls
no test coverage detected