Skip to content

Commit 288ced5

Browse files
committed
;doc:Special characters: edits [#2468]
1 parent 917e5bb commit 288ced5

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

hledger/hledger.m4.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ So you should probably avoid double quotes, unless you want that behaviour, eg i
310310
$ hledger register "assets:$SOMEACCT"
311311
```
312312

313-
But in an older Windows CMD.EXE window, you must use double quotes (not single quotes or backslash):
313+
But in an older Windows CMD.EXE window, you must use double quotes:
314314
```cli
315315
C:\Users\Me> hledger register "credit card"
316316
```
@@ -355,17 +355,19 @@ $ hledger balance cur:'\$'
355355

356356
### Escaping in other situations
357357

358-
hledger options and arguments are sometimes used in places other than the command line, with different escaping rules.
359-
For example, backslash-quoting generally does not work there. Here are some more tips.
358+
hledger options and arguments are sometimes used in places other than the command line, where the escaping/quoting rules are different.
359+
For example, backslash-quoting may not be available.
360+
Here's a quick reference:
360361

361362
| ||
362363
|:------------------------------|:--------------------------------------------------------------------------------------------
364+
| In unix shell | Use single quotes and/or backslash (or double quotes for variable interpolation)
365+
| In Windows `powershell` | Use single quotes (or double quotes for variable interpolation)
363366
| In Windows `cmd` | Use double quotes
364-
| In Windows `powershell` | Use single or double quotes
365367
| In hledger-ui's filter prompt | Use single or double quotes
366368
| In hledger-web's search form | Use single or double quotes
367-
| In an [argument file] | Don't use spaces, don't shell-escape, do regex-escape when needed
368-
| In a [config file] | Use single or double quotes, and enclose the whole argument <br>(`"desc:a b"` not `desc:"a b"`)
369+
| In an [argument file] | Don't use spaces, don't shell-escape, do regex-escape, write one argument/option per line
370+
| In a [config file] | Use single or double quotes, and enclose the whole argument <br>(`'desc:a b'` not `desc:'a b'`)
369371
| In `ghci` (the Haskell REPL) | Use double quotes, and enclose the whole argument
370372

371373
[argument file]: #argument-files

0 commit comments

Comments
 (0)