@@ -310,7 +310,7 @@ So you should probably avoid double quotes, unless you want that behaviour, eg i
310
310
$ hledger register "assets:$SOMEACCT"
311
311
```
312
312
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:
314
314
``` cli
315
315
C:\Users\Me> hledger register "credit card"
316
316
```
@@ -355,17 +355,19 @@ $ hledger balance cur:'\$'
355
355
356
356
### Escaping in other situations
357
357
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:
360
361
361
362
| ||
362
363
|:------------------------------|:--------------------------------------------------------------------------------------------
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)
363
366
| In Windows ` cmd ` | Use double quotes
364
- | In Windows ` powershell ` | Use single or double quotes
365
367
| In hledger-ui's filter prompt | Use single or double quotes
366
368
| 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' ` )
369
371
| In ` ghci ` (the Haskell REPL) | Use double quotes, and enclose the whole argument
370
372
371
373
[ argument file ] : #argument-files
0 commit comments