From 088e253eff34c524fc1cee29a8899d46ee98a338 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 3 Feb 2020 10:37:30 -0800 Subject: [PATCH] ;doc: journal: note quotes needed in auto posting queries (#1185) [ci skip] --- hledger-lib/hledger_journal.m4.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hledger-lib/hledger_journal.m4.md b/hledger-lib/hledger_journal.m4.md index b74ff5cc5..6d23ff576 100644 --- a/hledger-lib/hledger_journal.m4.md +++ b/hledger-lib/hledger_journal.m4.md @@ -1407,6 +1407,13 @@ These posting-generating rules look like normal postings, except the amount can - a numeric multiplier, eg `*2` (a star followed by a number N). The matched posting's amount (and total price, if any) will be multiplied by N. - a multiplier with a commodity symbol, eg `*$2` (a star, number N, and symbol S). The matched posting's amount will be multiplied by N, and its commodity symbol will be replaced with S. +A query term containing spaces must be enclosed in single or double +quotes, as on the command line. Eg, note the quotes around the second query term below: +```journal += expenses:groceries 'expenses:dining out' + (budget:funds:dining out) *-1 +``` + These rules have global effect - a rule appearing anywhere in your data can potentially affect any transaction, including transactions recorded above it or in another file. Some examples: