Source and compiled versions of all addons in bin are cluttering up
the commands list. I think this was reasonably well behaved, so I'm
re-enabling it, possibly with a slight fix (.c shadowing .exe).
Some notes:
- when there's only one addon with its base filename, its extension is not displayed (as before)
- addons with (case insensitive) .exe extension or no extension are considered compiled
- when there's exactly two addons with the same base filename, and one of them looks compiled, only that one is kept
- modification time is not checked; an old compiled addon overrides a newer source version
- when there's more than two addons with same base filename, all are kept
The previous cleanup defined long help separately from the usage text
generated by cmdargs. This meant keeping flag descriptions synced
between the two, and also the short help was often too verbose and
longer than the long help.
Now, the non-usage bits of long help are defined as pre and postambles
within the cmdargs mode, letting cmdargs generate the long help
including all flags. We derive the short help from this by truncating
at the start of the hledger common flags.
Most of the bundled addons (all but hledger-budget) now use the
new scheme and have pretty reasonable -h and --help output.
We can do more to reduce boilerplate for addon authors.
* cli: fix bug in pivot for postings without tag
Without this fix for postings without tag query checked effective
account which is always empty text ("").
* rewrite: inherit dates, change application order
For budgeting it is important to inherit actual date of posting if it
differs from date of transaction. These dates will be added
as a separate line of comment.
More natural order of rewrites is when result of first defined one is
available for all next rewrites.
* rewrite: factor out Hledger.Data.AutoTransaction
* rewrite: add diff output
With this option you can modify your original files without loosing
inter-transaction comments etc. I.e. you can run:
hledger-rewrite --diff Agency \
--add-posting 'Expenses:Taxes *0.17' \
| patch
As result multiple files should be updated.
Also it is nice to review your changes using colordiff instead of
patch.
* lib: track source lines range for journal
* doc: auto entries and diff output for rewrite
A few packages which included the Paths_* module no longer do,
and this seems ok with stack and cabal as far as I can tell.
That should be the only change, aside from a bunch of reorderings.
* bin: ignore chart and dupes addons
* lib: fix txnTieKnot
Ensure that postings refers to their transaction rather than original
one.
This should allow compiler perform destructive update and/or allow
garbage collecting old transaction.