From a5ffcc42ff2d6f6d06141b5098337f4bc092d2e0 Mon Sep 17 00:00:00 2001 From: Martin Michlmayr Date: Fri, 30 May 2014 23:46:20 -0400 Subject: Improve backwards compatibility with ledger2 This brings some single character format strings in line with what they actually meant in ledger2. Bug fix for #755 --- src/format.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/format.cc') diff --git a/src/format.cc b/src/format.cc index 302c28d6..402cfdfd 100644 --- a/src/format.cc +++ b/src/format.cc @@ -74,17 +74,18 @@ namespace { char letter; const char * expr; } single_letter_mappings[] = { - { 'd', "date" }, + { 'd', "aux_date ? format_date(date) + \"=\" + format_date(aux_date) : format_date(date)" }, + { 'D', "date" }, { 'S', "filename" }, { 'B', "beg_pos" }, { 'b', "beg_line" }, { 'E', "end_pos" }, { 'e', "end_line" }, - { 'X', "cleared" }, - { 'Y', "xact.cleared" }, - { 'C', "code" }, + { 'X', "\"* \" if cleared" }, + { 'Y', "\"* \" if xact.cleared" }, + { 'C', "\"(\" + code + \") \" if code" }, { 'P', "payee" }, - { 'a', "account.name" }, + { 'a', "account" }, { 'A', "account" }, { 't', "justify(scrub(display_amount), $min, $max, $left, color)" }, { 'T', "justify(scrub(display_total), $min, $max, $left, color)" }, -- cgit v1.2.3