From 8683d5feb2640013a58bd080fcd22e6421ea84b5 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 16 Oct 2024 16:23:45 -1000 Subject: [PATCH] ;doc: special characters: edits --- hledger/hledger.m4.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/hledger/hledger.m4.md b/hledger/hledger.m4.md index dd16dc7b2..d9b0f9284 100644 --- a/hledger/hledger.m4.md +++ b/hledger/hledger.m4.md @@ -338,7 +338,7 @@ $ hledger balance cur:\\$ ### Triple-escaping add-on command arguments When you run an external add-on command with `hledger` (described below), -any options or arguments being passed through to the add-on command will lose one level of shell-escaping. +any options or arguments being passed through to the add-on executable will lose one level of shell-escaping. So those will need an extra level of shell-escaping. Or, you can avoid this issue by running the add-on executable directly. @@ -362,13 +362,12 @@ $ hledger-ui cur:\\$ If you're wondering why there's *four* backslashes in the second example, perhaps this helps: -| | | -|-----------------|---------| -| unescaped: | `$` | -| escaped: | `\$` | -| double-escaped: | `\\$` | -| triple-escaped: | `\\\\$` | - +| || +|---------|---------------------------------------------------------------------------------------------------------- +| `$` | is unescaped +| `\$` | is single-escaped (for regex) +| `\\$` | is double-escaped (for regex, then for shell) +| `\\\\$` | is triple-escaped (for regex, then for shell, then both slashes once more for hledger argument pass-through ### Escaping in other contexts