From 8d67f94d67ff856dc1b4e3dba1440956be7daa97 Mon Sep 17 00:00:00 2001 From: fuleinist Date: Thu, 14 May 2026 00:22:31 +0800 Subject: [PATCH] docs(cli): document $$ escape in --help for replace_with Issue #341: $$ syntax is documented in README but missing from --help output. The replace_with arg help only mentioned $1, $2 capture groups but didn't document how to escape a literal $, which is a common need. Added one line to the doc comment noting that $$ produces a literal $. --- sd-cli/src/cli.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sd-cli/src/cli.rs b/sd-cli/src/cli.rs index 73de8fe..166c5ba 100644 --- a/sd-cli/src/cli.rs +++ b/sd-cli/src/cli.rs @@ -68,6 +68,8 @@ w - match full words only /// What to replace each match with. Unless in string mode, you may /// use captured values like $1, $2, etc. + /// + /// To insert a literal $, use $$. pub replace_with: String, /// The path to file(s). This is optional - sd can also read from STDIN.