From 7df105d02ad73f7441e1d8eb3b9f7d2e86884e2c Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Thu, 12 Mar 2026 16:14:44 -0700 Subject: [PATCH] docs: add $# comment line syntax --- CLAUDE.md | 1 + README.md | 10 ++++++++++ web/index.html | 6 ++++++ 3 files changed, 17 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 57e9dbf..c82e712 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -36,6 +36,7 @@ Transcript-based shell integration test runner. Bun + TypeScript. - `...` inline = matches any characters on that line - `[N]` on last line of expected output = assert exit code N - `[*]` = assert any non-zero exit code; default expects 0 +- `$#` comment line = not executed, no output expected (e.g. `$# start the server`) - `#` after a command = comment (stripped); `#` in expected output is literal - `@env KEY=VALUE` before first command = set environment variable - `@setup path.shout` before first command = prepend commands (and `@env`) from another file diff --git a/README.md b/README.md index 3777571..32a8d6a 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,16 @@ ls: missing: No such file or directory `[1]` after the expected output matches the exit code. +`$#` is a comment line — not executed, no output expected: + +``` +$# start the server +$ my-server & +$# now test it +$ curl localhost:8080 +OK +``` + ## Usage ``` diff --git a/web/index.html b/web/index.html index 3efb2cf..bceb555 100644 --- a/web/index.html +++ b/web/index.html @@ -196,6 +196,12 @@ Homebrew 5...

... matches anything — inline or across lines.

[1] asserts the exit code.

+

$# starts a comment line — not executed, no output expected.

+
$# start the server
+$ my-server &
+$# now test it
+$ curl localhost:8080
+OK