diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-19 13:09:23 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-19 13:09:23 -0500 |
| commit | 0f9e0d5fc26604a395c04b45746e89090f5558e5 (patch) | |
| tree | e245275437c02328a9201b9f19237677d39794c3 /scripts/setup-chess.sh | |
| parent | b4cd792f847e9513fd4e9bac4ee26b492dbdadc3 (diff) | |
| download | archsetup-0f9e0d5fc26604a395c04b45746e89090f5558e5.tar.gz archsetup-0f9e0d5fc26604a395c04b45746e89090f5558e5.zip | |
feat(tmux-util): add find subcommand
tmux-util find <pattern> walks every pane across every session, queries each pane's foreground command (`#{pane_current_command}`), and prints the location of any pane whose command matches the pattern. Output format: `<session>:<window>.<pane> <command>`, one per line.
Pattern is a basic ERE (passed through `grep -E`), so anchors and alternation work. Substring matching is the common case.
Exit code:
- 0 with output: matches found
- 1 with no output: no matches (lets you script around it)
- 2 with usage on stderr: missing or empty pattern
7 new tests cover Normal cases (single match, multi-match across sessions, format verification) and Boundary cases (no matches, no sessions, missing pattern, empty pattern). fake-tmux now parses pid:cmd entries in the state file so panes can carry a synthetic command name. Total suite: 39 tests, all green.
Diffstat (limited to 'scripts/setup-chess.sh')
0 files changed, 0 insertions, 0 deletions
