hledger/hledger/Hledger/Cli/Commands
2023-04-06 15:36:00 -10:00
..
Accounts.hs imp: acc: reorder/clean up flags 2023-03-30 10:58:46 -10:00
Accounts.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Accounts.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
Activity.hs activity: fix output after #1982; add tests 2023-02-21 07:17:21 -10:00
Activity.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Activity.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
Add.hs imp: partial/inferred dates are flexible, full dates are not (#1982) 2023-02-17 07:24:19 -10:00
Add.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Add.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
Aregister.hs imp: areg: when restricted by extra query args, show a hint in title 2023-02-21 08:29:59 -10:00
Aregister.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Aregister.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
Balance.hs imp: partial/inferred dates are flexible, full dates are not (#1982) 2023-02-17 07:24:19 -10:00
Balance.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Balance.txt ;doc: update CLI help text files 2023-02-21 00:16:46 -10:00
Balancesheet.hs fix!: cbr: Remove old account type query code. (#1921) 2022-08-21 08:27:51 +01:00
Balancesheet.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Balancesheet.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
Balancesheetequity.hs fix!: cbr: Remove old account type query code. (#1921) 2022-08-21 08:27:51 +01:00
Balancesheetequity.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Balancesheetequity.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
Cashflow.hs fix!: cbr: Remove old account type query code. (#1921) 2022-08-21 08:27:51 +01:00
Cashflow.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Cashflow.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
Check.hs feat: check: the tags check checks tag names 2023-02-16 11:56:22 -10:00
Check.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Check.txt ;doc: update CLI help text files 2023-02-21 00:16:46 -10:00
Close.hs imp: close: restore legacy flags --closing/--opening/--close-to/--open-from (#2020) 2023-04-06 11:12:35 -10:00
Close.md ;doc: close: fix typo 2023-04-06 12:18:00 -10:00
Close.txt ;doc: close: fix typo 2023-04-06 12:18:00 -10:00
Codes.hs dev: lib, cli, bin: enable/fix name shadowing warnings 2022-08-23 12:16:15 +01:00
Codes.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Codes.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
commands.m4 feat: embed some asciinema demos, and a demo command to play them 2023-03-16 21:58:38 -10:00
Commodities.hs fix!: Revert "fix!: utf-8: Use with-utf8 to ensure all files are read and written with utf8 encoding. (#1619)" 2022-06-01 09:35:18 +10:00
Commodities.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Commodities.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
Demo.hs dev: demo: notes 2023-03-18 20:49:12 -10:00
Demo.md ;imp: demo: help updates 2023-03-17 00:53:30 -10:00
Demo.txt ;doc: update CLI help text files 2023-03-17 00:53:57 -10:00
Descriptions.hs dev: lib, cli, bin: enable/fix name shadowing warnings 2022-08-23 12:16:15 +01:00
Descriptions.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Descriptions.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
Diff.hs fix!: Revert "fix!: utf-8: Use with-utf8 to ensure all files are read and written with utf8 encoding. (#1619)" 2022-06-01 09:35:18 +10:00
Diff.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Diff.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
Files.hs dev: lib, cli, bin: enable/fix name shadowing warnings 2022-08-23 12:16:15 +01:00
Files.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Files.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
Help.hs pkg: Drop base-compat-batteries dependency. 2021-10-31 07:56:07 -10:00
Help.md imp: help: doc: warn about old info on mac (fix #1770) 2023-04-06 15:36:00 -10:00
Help.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
Import.hs cli: fix some Commands file permissions 2023-02-20 16:24:54 -10:00
Import.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Import.txt ;doc: update CLI help text files 2023-02-21 00:16:46 -10:00
Incomestatement.hs fix!: cbr: Remove old account type query code. (#1921) 2022-08-21 08:27:51 +01:00
Incomestatement.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Incomestatement.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
Notes.hs dev: lib, cli, bin: enable/fix name shadowing warnings 2022-08-23 12:16:15 +01:00
Notes.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Notes.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
Payees.hs dev: lib, cli, bin: enable/fix name shadowing warnings 2022-08-23 12:16:15 +01:00
Payees.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Payees.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
Prices.hs cli: fix some Commands file permissions 2023-02-20 16:24:54 -10:00
Prices.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Prices.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
Print.hs imp: cli: merge register-match with register command 2023-01-25 10:44:12 -10:00
Print.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Print.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
README.md ;shake: commandtxts -> cmdhelp; note todos 2020-12-15 08:53:10 -08:00
Register.hs imp: cli: merge register-match with register command 2023-01-25 10:44:12 -10:00
Register.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Register.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
Rewrite.hs cli: fix some Commands file permissions 2023-02-20 16:24:54 -10:00
Rewrite.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Rewrite.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
Roi.hs imp: partial/inferred dates are flexible, full dates are not (#1982) 2023-02-17 07:24:19 -10:00
Roi.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Roi.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
Stats.hs fix: stats: fix a regression in date display since 1.28 (#2012) 2023-03-16 14:52:37 -10:00
Stats.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Stats.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
Tags.hs queries: Prefix boolean queries with expr: 2023-03-27 10:29:26 -10:00
Tags.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Tags.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10:00
Test.md cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Test.txt ;doc: update CLI usage texts 2023-02-20 16:24:54 -10: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