Files
coucou/scripts/test-terminal-target.sh
Mateus AmaralandClaude Opus 5.5 638a4ca8ae Open terminal: bring back the app the session runs in
"Open terminal" and the Jump to terminal shortcut picked the first running
app from a fixed list (Terminal, iTerm, kitty, Ghostty). Sessions in any
other terminal (cmux, Warp, WezTerm, Alacritty...) got a new Terminal.app
window instead.

The hook already sends the session's app as bundle_id. Keep it on the task
next to sessionCwd and activate that app first, then fall back to the known
terminals (now including cmux, Warp, WezTerm and Alacritty), then
Terminal.app as before. The three copies of the list now share
TerminalTarget, which has Foundation-only tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 09:14:28 -03:00

9 lines
325 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
TEST_DIR="$(mktemp -d "${TMPDIR:-/tmp}/coucou-terminal-target.XXXXXX")"
trap 'rm -rf "$TEST_DIR"' EXIT
swiftc NotchBuddy/Sources/App/TerminalTarget.swift \
tests/TerminalTargetTests.swift -o "$TEST_DIR/terminal-target-tests"
"$TEST_DIR/terminal-target-tests"