hledger/hledger/Hledger/Cli/Commands
Stephen Morgan 73925ae965 fix: types: Ensure auto postings can match against and be matched by type: queries.
This requires checking parent accounts for any new accounts introduced by auto postings which do not exist in the original journal.

Also refactor journalFinalise to only call journalPostingsAddAccountTags once, and use fewer intermediate variables.
2022-02-03 15:32:00 -10:00
..
Check lib!: Remove GenericSourcePos, and replace it with either SourcePos or 2021-09-20 08:38:33 -10:00
Accounts.hs fix: types: Ensure auto postings can match against and be matched by type: queries. 2022-02-03 15:32:00 -10:00
Accounts.md feat: accounts: --types shows account types (#1820) 2022-02-01 18:06:19 -10:00
Accounts.txt ;update CLI usage texts 2020-12-26 08:21:45 -08:00
Activity.hs ref: Return the interval split in reportSpan, to reduce the number 2022-01-26 08:05:37 -10:00
Activity.md ;doc: fix flags marker appearing in manuals 2020-01-05 07:41:01 -08:00
Activity.txt ;doc: fix flags marker appearing in manuals 2020-01-05 07:41:01 -08:00
Add.hs pkg: Drop base-compat-batteries dependency. 2021-10-31 07:56:07 -10:00
Add.md add: fix help - arguments are inputs, not a query 2020-07-07 10:10:13 -07:00
Add.txt ;regen manuals 2020-07-07 10:19:56 -07:00
Aregister.hs imp: areg: clearer, more consistent error messages 2022-01-31 16:44:13 -10:00
Aregister.md doc: areg: clarify (#1634) 2021-07-31 18:27:23 -10:00
Aregister.txt ;doc: update CLI usage texts 2021-08-08 09:39:20 -10:00
Balance.hs ref: Return the interval split in reportSpan, to reduce the number 2022-01-26 08:05:37 -10:00
Balance.md ;doc: bal: update tidy description, example 2021-12-06 15:03:40 -10:00
Balance.txt ;doc: update CLI usage texts 2021-12-06 15:04:07 -10:00
Balancesheet.hs ref: bal: rename some report types to clarify/sync with docs 2021-07-15 14:22:20 -10:00
Balancesheet.md Revert "balcmds: note that csv output forces list mode (#1566)" 2021-06-06 18:35:01 -10:00
Balancesheet.txt ;update CLI usage texts 2021-03-07 10:25:08 -08:00
Balancesheetequity.hs ref: bal: rename some report types to clarify/sync with docs 2021-07-15 14:22:20 -10:00
Balancesheetequity.md Revert "balcmds: note that csv output forces list mode (#1566)" 2021-06-06 18:35:01 -10:00
Balancesheetequity.txt ;update CLI usage texts 2021-03-07 10:25:08 -08:00
Cashflow.hs ref: bal: rename some report types to clarify/sync with docs 2021-07-15 14:22:20 -10:00
Cashflow.md Revert "balcmds: note that csv output forces list mode (#1566)" 2021-06-06 18:35:01 -10:00
Cashflow.txt ;update CLI usage texts 2021-03-07 10:25:08 -08:00
Check.hs lib,cli,ui,web: Add check balancednoautoconversion command, which checks that 2021-06-07 18:58:58 -10:00
Check.md lib,cli,ui,web: Add check balancednoautoconversion command, which checks that 2021-06-07 18:58:58 -10:00
Check.txt ;update CLI usage texts 2021-06-15 06:23:44 -10:00
Checkdates.hs Merge pull request #1560 from Xitian9/rationalisevaluation 2021-06-07 19:02:44 -10:00
Close.hs cln: print, close: Check the show_costs_ option instead of directly 2022-01-26 08:07:11 -10:00
Close.md ;doc: close: mention another cause of non-zero bse 2021-08-24 11:15:26 -10:00
Close.txt ;doc: update CLI usage texts 2021-09-09 14:44:09 -10:00
Codes.hs lib!: Rename the fields of ReportSpec. 2021-07-23 10:37:08 -10:00
Codes.md codes: new command for listing transaction codes 2020-07-07 13:38:49 -07:00
Codes.txt codes: new command for listing transaction codes 2020-07-07 13:38:49 -07:00
commands.m4 cli: doc: sync/update manual & cli command lists 2020-12-23 10:28:31 -08:00
Commodities.hs ;dev: commodities: note todo 2021-11-22 09:59:49 -10:00
Commodities.md ;doc: fix flags marker appearing in manuals 2020-01-05 07:41:01 -08:00
Commodities.txt ;doc: fix flags marker appearing in manuals 2020-01-05 07:41:01 -08:00
Descriptions.hs lib,cli,ui,web: Introduce ReportSpec, which holds ReportOpts, the day of 2020-10-23 14:14:11 -07:00
Descriptions.md descriptions, notes, payees: fix/improve help and comments 2020-07-07 13:38:49 -07:00
Descriptions.txt descriptions, notes, payees: fix/improve help and comments 2020-07-07 13:38:49 -07:00
Diff.hs pkg!: Remove Hledger.Utils.UTF8IOCompat module. 2021-08-30 15:57:33 -10:00
Diff.md ;doc: fix flags marker appearing in manuals 2020-01-05 07:41:01 -08:00
Diff.txt ;doc: fix flags marker appearing in manuals 2020-01-05 07:41:01 -08:00
Files.hs pkg!: Remove Hledger.Utils.UTF8IOCompat module. 2021-08-30 15:57:33 -10:00
Files.md ;doc: fix flags marker appearing in manuals 2020-01-05 07:41:01 -08:00
Files.txt ;doc: fix flags marker appearing in manuals 2020-01-05 07:41:01 -08:00
Help.hs pkg: Drop base-compat-batteries dependency. 2021-10-31 07:56:07 -10:00
Help.md ;help: doc: clarify 2021-08-08 10:15:21 -10:00
Help.txt ;doc: update CLI usage texts 2021-09-09 14:44:09 -10:00
Import.hs cln: Rename balancingOpts to defbalancingopts, to be consistent with definputopts, defreportopts, etc. 2021-08-28 19:12:04 -10:00
Import.md ;import: doc: tweak 2021-02-18 18:43:22 -08:00
Import.txt ;update CLI usage texts 2021-03-07 10:25:08 -08:00
Incomestatement.hs ;dev: is: code notes 2021-11-25 11:55:58 -10:00
Incomestatement.md Revert "balcmds: note that csv output forces list mode (#1566)" 2021-06-06 18:35:01 -10:00
Incomestatement.txt ;update CLI usage texts 2021-03-07 10:25:08 -08:00
Notes.hs lib,cli,ui,web: Introduce ReportSpec, which holds ReportOpts, the day of 2020-10-23 14:14:11 -07:00
Notes.md descriptions, notes, payees: fix/improve help and comments 2020-07-07 13:38:49 -07:00
Notes.txt descriptions, notes, payees: fix/improve help and comments 2020-07-07 13:38:49 -07:00
Payees.hs lib!: Rename the fields of ReportSpec. 2021-07-23 10:37:08 -10:00
Payees.md payees: add --used/--declared flags, like accounts 2021-01-17 16:37:38 -08:00
Payees.txt ;update CLI usage texts 2021-02-17 12:07:06 -08:00
Prices.hs fix: prices: Do not try to generate prices when there would be a zero 2021-11-18 20:59:52 -10:00
Prices.md imp: prices: use --infer-market-prices instead of --costs 2021-09-18 12:12:31 -10:00
Prices.txt ;doc: update CLI usage texts 2021-09-20 16:55:22 -10:00
Print.hs cln: print, close: Check the show_costs_ option instead of directly 2022-01-26 08:07:11 -10:00
Print.md journal: doc updates for aliases corrupting account names (#1788) 2021-12-22 15:14:37 -10:00
Print.txt ;doc: update CLI usage texts 2022-01-15 08:56:45 -10:00
Printunique.hs Use nubSort instead of nub . sort. 2020-01-04 08:31:10 -08:00
Printunique.md ;doc: fix flags marker appearing in manuals 2020-01-05 07:41:01 -08:00
Printunique.txt ;doc: fix flags marker appearing in manuals 2020-01-05 07:41:01 -08:00
README.md ;shake: commandtxts -> cmdhelp; note todos 2020-12-15 08:53:10 -08:00
Register.hs imp: csv: Do not display thousands separators when outputting csv. 2021-12-06 15:17:46 -10:00
Register.md cli: drop deprecated command aliases a, b, p, r, txns 2020-12-26 08:21:45 -08:00
Register.txt ;update CLI usage texts 2020-12-26 08:21:45 -08:00
Registermatch.hs lib,cli,ui,bin: Create a new API for MixedAmount arithmetic. This should 2021-03-18 09:47:21 +11:00
Registermatch.md ;doc: fix flags marker appearing in manuals 2020-01-05 07:41:01 -08:00
Registermatch.txt ;doc: fix flags marker appearing in manuals 2020-01-05 07:41:01 -08:00
Rewrite.hs fix: types: Ensure auto postings can match against and be matched by type: queries. 2022-02-03 15:32:00 -10:00
Rewrite.md ;doc: commands: include in man pages again; simplify headings 2020-12-20 20:08:35 -08:00
Rewrite.txt ;doc: fix flags marker appearing in manuals 2020-01-05 07:41:01 -08:00
Roi.hs ref: Return the interval split in reportSpan, to reduce the number 2022-01-26 08:05:37 -10:00
Roi.md ;doc: roi: dear lord fix links again 2022-01-21 08:20:05 -10:00
Roi.txt ;doc: update CLI usage texts 2022-01-21 08:32:29 -10:00
Stats.hs ref: Return the interval split in reportSpan, to reduce the number 2022-01-26 08:05:37 -10:00
Stats.md imp: stats: also show run time and throughput 2021-11-20 20:51:21 -10:00
Stats.txt ;doc: update CLI usage texts 2021-11-20 22:07:40 -10:00
Tags.hs pkg!: cli: Add --today option to explicitly set the current date. (#1674) 2021-09-09 14:40:39 -10:00
Tags.md tags: add --parsed flag, hide empties without --empty 2020-07-14 10:20:52 -07:00
Tags.txt ;regen help, manuals 2020-07-14 10:25:04 -07:00
Test.md ;doc: fix flags marker appearing in manuals 2020-01-05 07:41:01 -08:00
Test.txt ;doc: fix flags marker appearing in manuals 2020-01-05 07:41:01 -08:00

hledgers built-in commands.

Each command has a similarly-named code module, Somecommand.hs, and documentation file, Somecommand.md.

The command doc is converted to plain text in Somecommand.txt, and which is included by Somecommand.hs to form command line help (the output of hledger COMMAND --help).

After changing md files, regenerating and committing the txt files is optional. If you dont do it, it will get done later (before release). It can be done by:

./Shake cmdhelp

Or, by you can regenerate them while also building packages:

./Shake hledger   # or, all packages: ./Shake build

Builds made with stack, cabal, etc. wont notice changes in these md files, so use the above method if you need that.

The md files are also included by hledger/hledger_commands.m4.md to form the hledger manual, which can be regenerated with:

./Shake manuals [website]

Here are more special features/conventions of command doc files (see *.md for examples):

  • The content is pandoc markdown. m4 macros are not supported.

  • In manuals, they are rendered with formatting and hyperlinks when supported by the various output formats.

  • In command line help, they are rendered as plain text, with verbatim blocks unindented, and with lines longer than 78 characters wrapped (unless they contain no spaces).

  • To avoid unsightly line wrapping in command line help, try to keep verbatim examples to at most 78 characters wide. When necessary, we may be forced to cheat and alter command output slightly, eg reducing the width of registers typically 79-wide reports by one.

  • The first line should specify the command name and any aliases, as words separated by spaces and/or commas. It should end with a backslash (to force a line break in the output).

  • Short help, about one paragraph in length, should begin on the second line.

  • If the short help is more than one line, its first line should end with a single newline, not two (otherwise it will be displayed with two newlines after each line in command line help).

  • In command line help, the short help is displayed with blank lines removed (paragraphs run together). Blank lines can still be used for markdown formatting though, eg to define a list.

  • After the short help, there should be a paragraph containing just _FLAGS. This marks the end of the short help, and it will be replaced in command line help by the flags list. (Without it, the flags list appears at the end of command line help.) The flags list will not appear in the hledger manual.

  • Long help (as many paragraphs as needed) follows the _FLAGS marker. This often ends with one or more examples.

XXX Command docs with examples wider than 78: close rewrite