This repository has no description
0

Configure Feed

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

Allow folling a peek in plain mode

Nathan Herald (Mar 28, 2026, 12:08 PM +0100) 5fe14269 d2b72f8b

+5 -6
-4
src/cli.ts
··· 195 195 else break; 196 196 pi++; 197 197 } 198 - if (follow && plain) { 199 - console.error("Cannot use --plain with -f (follow mode streams raw terminal output)."); 200 - process.exit(1); 201 - } 202 198 const peekName = args[pi]; 203 199 if (!peekName) { 204 200 console.error("Usage: pty peek [-f] [--plain] <name>");
+5 -2
src/client.ts
··· 11 11 decodeExit, 12 12 } from "./protocol.ts"; 13 13 import { getSocketPath } from "./sessions.ts"; 14 + import { stripAnsi } from "./tui/colors.ts"; 14 15 15 16 const DETACH_KEY = 0x1c; // Ctrl+\ (legacy encoding) 16 17 const DETACH_KEY_KITTY = "\x1b[92;5u"; // Ctrl+\ (Kitty keyboard protocol) ··· 112 113 113 114 case MessageType.DATA: 114 115 if (follow) { 115 - stdout.write(packet.payload); 116 + stdout.write(options.plain ? stripAnsi(packet.payload.toString()) : packet.payload); 116 117 } 117 118 break; 118 119 119 120 case MessageType.EXIT: { 120 121 const code = decodeExit(packet.payload); 121 122 socket.destroy(); 122 - stdout.write(TERMINAL_SANITIZE + CURSOR_TO_BOTTOM); 123 + if (!options.plain) { 124 + stdout.write(TERMINAL_SANITIZE + CURSOR_TO_BOTTOM); 125 + } 123 126 if (follow) { 124 127 stdout.write(`\r\n[session exited with code ${code}]\r\n`); 125 128 }