;doc:tags: discuss tag names, list reserved ones

This commit is contained in:
Simon Michael 2024-01-21 01:25:54 -10:00
parent 298a9c29b4
commit 29ac554765

View File

@ -1611,6 +1611,29 @@ So in the example above, the expenses posting effectively has all five tags
(by inheriting from the account and transaction),
and the transaction also has all five tags (by acquiring from the expenses posting).
### Tag names
Tag names are currently not very clearly specified; any sequence of non-whitespace characters
followed by a colon may work.
The following tag names are generated by hledger or have special significance to hledger,
so you may want to avoid using them yourself:
- `generated-transaction` -- a transaction generated by --forecast
- `generated-posting` -- a posting generated by --auto
- `modified` -- a transaction which has had postings added by --auto
- `type` -- declares an account's type in an account declaration
- `t` -- stores the (user defined, single letter) type of a 15m unit of time parsed from timedot format
Some additional tag names with an underscore prefix are used internally and not displayed
in reports (but can be matched by queries):
- `_generated-transaction`
- `_generated-posting`
- `_modified`
- `_conversion-matched`
### Tag values
Tags can have a value, which is any text after the colon up until a comma or end of line