This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

Proxy dash commands like git

Nathan Herald (Apr 3, 2026, 12:02 PM +0200) e3153025 af068c8f

+16 -1
+16 -1
src/cli.ts
··· 2 2 import * as os from "node:os"; 3 3 import * as path from "node:path"; 4 4 import * as readline from "node:readline/promises"; 5 - import { spawnSync } from "node:child_process"; 5 + import { spawnSync, execFileSync } from "node:child_process"; 6 6 import { attach, peek, send, queryStats, type StatsResult } from "./client.ts"; 7 7 import { parseSeqValue } from "./keys.ts"; 8 8 import { ··· 373 373 } 374 374 375 375 default: { 376 + // Look for pty-<command> in PATH (like git does with git-<command>) 377 + const ext = `pty-${command}`; 378 + let extPath: string | null = null; 379 + try { 380 + extPath = execFileSync("which", [ext], { encoding: "utf8" }).trim(); 381 + } catch {} 382 + 383 + if (extPath) { 384 + const result = spawnSync(extPath, args.slice(1), { 385 + stdio: "inherit", 386 + env: process.env, 387 + }); 388 + process.exit(result.status ?? 1); 389 + } 390 + 376 391 console.error(`Unknown command: ${command}`); 377 392 usage(); 378 393 process.exit(1);