summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/windows/polyglot-hooks.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/windows/polyglot-hooks.md b/docs/windows/polyglot-hooks.md
index 7a54aa8..d6970e1 100644
--- a/docs/windows/polyglot-hooks.md
+++ b/docs/windows/polyglot-hooks.md
@@ -209,6 +209,11 @@ escape_for_json() {
replace_all "$escaped" "$tab" '\t'
using_superpowers_escaped=$escaped
}
+
+# The result is left in a variable instead of printed, because capturing
+# output with $(...) forks. Call the function, then read the variable:
+# escape_for_json "$content"
+# json=$using_superpowers_escaped
```
## Troubleshooting