Commit Graph

41 Commits

Author SHA1 Message Date
Simon Michael
46bbc9e0aa fix simple aliases that match the whole account name 2015-05-28 10:40:48 -07:00
Simon Michael
68c71de25d tighten up status:X parsing, cleanups 2015-05-16 12:21:50 -07:00
Simon Michael
d1f63334ee handle pending status correctly, add --pending (#250)
A transaction/posting status of ! (pending) was effectively equivalent
to * (cleared). Now it's a separate state, not matched by --cleared.
The new Ledger-compatible --pending flag matches it, and so does
--uncleared. The equivalent search queries are now status:*, status:!
and status: (the old status:1 and status:0 spellings are deprecated).

Since we interpret --uncleared and status: as "any state except cleared",
it's not currently possible to match things which are neither cleared
nor pending.
2015-05-16 11:51:35 -07:00
Simon Michael
077e3c6a02 journal: re-add non-regex aliases, as default (#252)
The regex account aliases added in 0.24 trip up people switching between
hledger and Ledger. (Also they are currently slow).

This change makes the old non-regex aliases the default; they are
unsurprising, useful, and pretty close in functionality to Ledger's.

The new regex aliases are also available; they must be enclosed in
forward slashes. Ledger effectively ignores these, which is ok.

Also clarify docs, refactor, and use the same parser for alias
directives and alias options
2015-05-14 13:01:50 -07:00
Simon Michael
d25fe21834 apply all matching account aliases, not just one directive and one option 2014-10-29 08:20:27 -07:00
Simon Michael
e892fdc6d5 parsing: aliases now match by regular expression
alias match patterns (the part left of the =) are now case-insensitive
regular expressions matching anywhere in the account name. The
replacement string (the part right of the =) can replace multiple
matches within the account name. The replacement string does not yet
support any of the usual syntax like backreferences.
2014-10-24 15:05:10 -07:00
gwern
d1618aaca8 strip trailing whitespace from all Haskell files 2014-10-14 18:48:24 -07:00
Simon Michael
40ab1e17f6 amounts cleanups, and support zeros with commodity 2014-07-28 18:45:13 -07:00
Simon Michael
88f18adbc4 show posting dates in debug output 2014-05-06 21:35:38 -07:00
Simon Michael
746f22458f fix a warning 2014-04-14 08:31:11 -07:00
Simon Michael
a761ae5b86 balance: support --date2 in multicolumn reports (cf #174) 2014-04-13 15:14:07 -07:00
Simon Michael
424db9a09e register: support --date2 with a report interval (fixes #174) 2014-04-13 14:57:40 -07:00
Simon Michael
712e6f1e36 register: fix tag: matching all sibling postings 2014-03-05 14:43:58 -08:00
Simon Michael
6f49263c9b print: tag queries will match transactions whose postings contain the tag 2014-03-01 17:42:13 -08:00
Simon Michael
0be986fcb9 parsing: actually parse balance assertions
Parser unit test is commented out until HTF tests are fixed.
2013-05-28 16:22:30 -07:00
Simon Michael
7175c57992 reg: --related/-r flag to show other postings in the transaction 2012-12-22 00:24:38 +00:00
Simon Michael
552a15a1ba reg: --width/-w option to adjust register overall output width 2012-12-21 21:56:11 +00:00
Simon Michael
621a91807e rename actual/effective dates to primary/secondary
The command-line flag is now --date2. Alternate spellings --effective and --aux-date
are accepted for compatibility.
2012-12-06 04:43:41 +00:00
Simon Michael
20e68f23a8 support effective dates on postings as well
We now preserve all dates while reporting, instead of overwriting one with the other.
2012-12-06 02:41:37 +00:00
Simon Michael
ccbc071289 more cleanup, fix duplicate tag display 2012-12-06 02:09:53 +00:00
Simon Michael
27621515ea bal, reg: use posting date if specified, clarify posting effective date not yet supported 2012-12-06 01:10:15 +00:00
Simon Michael
e75abc4625 parse posting dates, better comment/tag handling, begin using HTF for unit testing 2012-12-06 00:28:23 +00:00
Simon Michael
4aafeb32e6 refactor: clean up Posting construction 2012-12-06 00:03:07 +00:00
Simon Michael
cb905a741c new query by tag implementation 2012-05-28 00:27:55 +00:00
Simon Michael
2fb2aea056 rename metadata fields to tags 2012-05-27 22:59:06 +00:00
Simon Michael
3ee6a351f3 big query/tests/show refactoring
- use new query system for command line too, filterspec is no more
- move unit tests near the code they test, run them in bottom up order, add more
- more precise Show instances, used for debugging not ui
2012-05-27 18:14:20 +00:00
Simon Michael
a58a5f96ad more robust comments & metadata, on postings too, and document as "tags" 2012-05-14 18:52:22 +00:00
Simon Michael
b6b5c5ffaa explicit exports for Transaction and Posting 2012-05-07 14:36:40 +00:00
Simon Michael
238594d976 type signature for nullposting so tags can find it 2011-06-13 20:59:13 +00:00
Simon Michael
676845b269 trim even more fat from amounts 2011-08-31 17:44:20 +00:00
Simon Michael
10fd7ebc42 simplify amounts code, make tests pass 2011-08-31 16:54:10 +00:00
Simon Michael
957c349780 --alias command-line option 2011-08-05 00:05:39 +00:00
Simon Michael
4015e02097 account directive should preserve virtual/balanced virtual posting type 2011-08-02 23:29:13 +00:00
Simon Michael
5084280879 imports, api cleanup 2011-05-28 04:11:44 +00:00
Omari Norman
4ec0cc474f Fix postingCleared for individually-cleared postings
The previous code simply looked directly to the parent transaction's
status to determine whether the posting was cleared. This gave
erroneous information for postings that were individually cleared
even though the parent transaction was not cleared.
2010-12-26 22:39:28 +00:00
Simon Michael
dd9e78a67a reorganize tests 2010-12-27 20:26:22 +00:00
Simon Michael
e707f97847 parsing: parse transaction and posting metadata, though we don't use it yet 2010-11-13 22:17:32 +00:00
Simon Michael
4f49094088 refactor: date spans, commodities 2010-07-11 18:56:36 +00:00
Simon Michael
e499efce77 type signature 2010-07-11 22:17:48 +00:00
Simon Michael
856f1f965a docs: hledger-lib module haddock updates 2010-05-27 03:58:47 +00:00
Simon Michael
7d4593cee9 move Ledger.* to Hledger.Data.* 2010-05-19 23:08:53 +00:00