Skip to content

Commit

Permalink
;doc: special characters: edits
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichael committed Oct 17, 2024
1 parent 0dbcafd commit 8683d5f
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions hledger/hledger.m4.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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

Expand Down

0 comments on commit 8683d5f

Please sign in to comment.