diff options
author | Martin Michlmayr <tbm@cyrius.com> | 2014-05-30 23:46:20 -0400 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2014-05-30 23:52:36 -0400 |
commit | a5ffcc42ff2d6f6d06141b5098337f4bc092d2e0 (patch) | |
tree | d3c79eb8cbc5dbb853acce381374efc207d1089d /src/format.cc | |
parent | 53b8aa8802a590f0139355fa0a4e3857f39d9836 (diff) | |
download | fork-ledger-a5ffcc42ff2d6f6d06141b5098337f4bc092d2e0.tar.gz fork-ledger-a5ffcc42ff2d6f6d06141b5098337f4bc092d2e0.tar.bz2 fork-ledger-a5ffcc42ff2d6f6d06141b5098337f4bc092d2e0.zip |
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
Diffstat (limited to 'src/format.cc')
-rw-r--r-- | src/format.cc | 11 |
1 files changed, 6 insertions, 5 deletions
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)" }, |