hledger/hledger/Hledger/Cli/Commands
Henning Thielemann fa58dc11f4 cli: Commands.Balance: remove lambda on ropts1 for balanceReport*
This is consistent with the calls to multiBalanceReport* and budgetReport*.
2024-10-15 14:13:53 -10:00
..
Accounts.hs imp: ui, web, cli, all cli commands now show the general flags grouped 2024-05-29 09:37:19 -10:00
Accounts.md imp: doc: show flags help in manuals 2024-06-07 06:55:33 -07:00
Accounts.txt ;doc: update help 2024-06-07 07:05:52 -07:00
Activity.hs imp: ui, web, cli, all cli commands now show the general flags grouped 2024-05-29 09:37:19 -10:00
Activity.md imp: doc: show flags help in manuals 2024-06-07 06:55:33 -07:00
Activity.txt ;doc: update help 2024-06-07 07:05:52 -07:00
Add.hs Move SortSpec to Hledger.Reports.ReportOptions 2024-09-05 11:56:07 +01:00
Add.md ;fix: add help: D does not cause it to add the symbol 2024-07-10 21:43:17 +01:00
Add.txt ;doc: update help 2024-09-09 14:07:07 -07:00
Aregister.hs imp: areg: html output uses a hledger.css file if any, like balcmds 2024-09-29 22:12:57 -10:00
Aregister.md imp: doc: show flags help in manuals 2024-06-07 06:55:33 -07:00
Aregister.txt ;doc: update help 2024-06-07 07:05:52 -07:00
Balance.hs cli: Commands.Balance: remove lambda on ropts1 for balanceReport* 2024-10-15 14:13:53 -10:00
Balance.md ;doc: bal: improve --layout doc 2024-10-03 22:57:59 -10:00
Balance.txt ;doc: update help 2024-09-29 12:13:30 -10:00
Balancesheet.hs fix!: cbr: Remove old account type query code. (#1921) 2022-08-21 08:27:51 +01:00
Balancesheet.md ;doc: update help 2024-09-29 12:13:30 -10:00
Balancesheet.txt ;doc: update help 2024-09-29 12:13:30 -10:00
Balancesheetequity.hs fix!: cbr: Remove old account type query code. (#1921) 2022-08-21 08:27:51 +01:00
Balancesheetequity.md ;doc: update help 2024-09-29 12:13:30 -10:00
Balancesheetequity.txt ;doc: update help 2024-09-29 12:13:30 -10:00
Cashflow.hs fix!: cbr: Remove old account type query code. (#1921) 2022-08-21 08:27:51 +01:00
Cashflow.md ;doc: update help 2024-09-29 12:13:30 -10:00
Cashflow.txt ;doc: update help 2024-09-29 12:13:30 -10:00
Check.hs imp: ui, web, cli, all cli commands now show the general flags grouped 2024-05-29 09:37:19 -10:00
Check.md imp: doc: show flags help in manuals 2024-06-07 06:55:33 -07:00
Check.txt ;doc: update help 2024-06-07 07:05:52 -07:00
Close.hs imp: ui, web, cli, all cli commands now show the general flags grouped 2024-05-29 09:37:19 -10:00
Close.md imp: doc: show flags help in manuals 2024-06-07 06:55:33 -07:00
Close.txt ;doc: update help 2024-06-07 07:05:52 -07:00
Codes.hs imp: ui, web, cli, all cli commands now show the general flags grouped 2024-05-29 09:37:19 -10:00
Codes.md imp: doc: show flags help in manuals 2024-06-07 06:55:33 -07:00
Codes.txt ;doc: update help 2024-06-07 07:05:52 -07:00
commands.m4 ;doc: The flattening: adapt to the site's depth-1 page TOCs 2024-05-22 13:06:08 -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 imp: doc: show flags help in manuals 2024-06-07 06:55:33 -07:00
Commodities.txt ;doc: update help 2024-06-07 07:05:52 -07:00
Demo.hs dev: fix some partial head/tails, silence ghc 9.8's new warnings 2024-02-28 15:58:21 -10:00
Demo.md ;doc: demo: link asciinema 2024-09-27 01:30:53 -10:00
Demo.txt ;doc: update help 2024-06-07 07:05:52 -07:00
Descriptions.hs imp: ui, web, cli, all cli commands now show the general flags grouped 2024-05-29 09:37:19 -10:00
Descriptions.md imp: doc: show flags help in manuals 2024-06-07 06:55:33 -07:00
Descriptions.txt ;doc: update help 2024-06-07 07:05:52 -07:00
Diff.hs dev: fix some partial head/tails, silence ghc 9.8's new warnings 2024-02-28 15:58:21 -10:00
Diff.md imp: diff, prices: improve help layout 2024-06-07 07:05:35 -07:00
Diff.txt ;doc: update help 2024-06-07 07:05:52 -07:00
Files.hs imp: files: support conf flags (and other hidden flags) 2024-07-01 23:06:14 +01:00
Files.md imp: doc: show flags help in manuals 2024-06-07 06:55:33 -07:00
Files.txt ;doc: update help 2024-06-07 07:05:52 -07:00
Help.hs ;doc: cli: simplify, use generic help flags again 2024-05-31 19:54:18 -10:00
Help.md ;doc: update help 2024-06-25 18:37:55 +01:00
Help.txt ;doc: update help 2024-06-25 18:37:55 +01:00
Import.hs imp: ui, web, cli, all cli commands now show the general flags grouped 2024-05-29 09:37:19 -10:00
Import.md imp: doc: show flags help in manuals 2024-06-07 06:55:33 -07:00
Import.txt ;doc: update help 2024-06-07 07:05:52 -07:00
Incomestatement.hs fix!: cbr: Remove old account type query code. (#1921) 2022-08-21 08:27:51 +01:00
Incomestatement.md ;doc: update help 2024-09-29 12:13:30 -10:00
Incomestatement.txt ;doc: update help 2024-09-29 12:13:30 -10:00
Notes.hs imp: ui, web, cli, all cli commands now show the general flags grouped 2024-05-29 09:37:19 -10:00
Notes.md imp: doc: show flags help in manuals 2024-06-07 06:55:33 -07:00
Notes.txt ;doc: update help 2024-06-07 07:05:52 -07:00
Payees.hs imp: ui, web, cli, all cli commands now show the general flags grouped 2024-05-29 09:37:19 -10:00
Payees.md imp: doc: show flags help in manuals 2024-06-07 06:55:33 -07:00
Payees.txt ;doc: update help 2024-06-07 07:05:52 -07:00
Prices.hs imp: ui, web, cli, all cli commands now show the general flags grouped 2024-05-29 09:37:19 -10:00
Prices.md imp: diff, prices: improve help layout 2024-06-07 07:05:35 -07:00
Prices.txt ;doc: update help 2024-06-07 07:05:52 -07:00
Print.hs dev: extract beancount output helpers to Hledger.Write.Beancount 2024-10-10 23:25:07 -10:00
Print.md imp: doc: show flags help in manuals 2024-06-07 06:55:33 -07:00
Print.txt ;doc: update help 2024-06-07 07:05:52 -07:00
README.md ;tools: Shake cmdhelp -> cmddocs, now runs hledger to update flag docs 2024-06-07 14:35:31 -07:00
Register.hs imp: reg --sort: show supported keys in help and error message [#2211] 2024-09-09 14:04:43 -07:00
Register.md ;doc: update help 2024-09-09 14:04:43 -07:00
Register.txt ;doc: update help 2024-09-09 14:04:43 -07:00
Rewrite.hs dev: fix warnings with ghc 9.10 / base 4.20 2024-09-30 17:20:13 -10:00
Rewrite.md imp: doc: show flags help in manuals 2024-06-07 06:55:33 -07:00
Rewrite.txt ;doc: update help 2024-06-07 07:05:52 -07:00
Roi.hs dev: refactor table rendering code 2024-06-12 05:01:48 +01:00
Roi.md imp: doc: show flags help in manuals 2024-06-07 06:55:33 -07:00
Roi.txt ;doc: update help 2024-06-07 07:05:52 -07:00
Stats.hs imp: ui, web, cli, all cli commands now show the general flags grouped 2024-05-29 09:37:19 -10:00
Stats.md imp: doc: show flags help in manuals 2024-06-07 06:55:33 -07:00
Stats.txt ;doc: update help 2024-06-07 07:05:52 -07:00
Tags.hs imp: ui, web, cli, all cli commands now show the general flags grouped 2024-05-29 09:37:19 -10:00
Tags.md imp: diff, prices: improve help layout 2024-06-07 07:05:35 -07:00
Tags.txt ;doc: update help 2024-06-07 07:05:52 -07:00
Test.md imp: doc: show flags help in manuals 2024-06-07 06:55:33 -07:00
Test.txt ;doc: update help 2024-06-07 07:05:52 -07: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 cmddocs

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.

  • The format is “hledger command help”. Basically there should be a command name and blank line, an optional parenthesised command alias/abbreviation and blank line, a short help preamble, a code block with flags class containing a Flags: line then the command-specific flags help output (or “none”), and an optional longer help postamble. See parseCommandHelp in ../CliOptions.hs for the exact format.

  • In manuals, these are rendered with formatting and hyperlinks in output formats which support those.

  • In help output, they are rendered

    • as plain text
    • with blank lines removed from the preamble
    • with lines longer than 78 characters wrapped (unless they contain no spaces)
    • with code blocks unindented
    • with the flags code block replaced by dynamically generated flags help (for both command-specific and general flags)

The postamble often ends with one or more examples. To avoid unsightly line wrapping in command line help, try to keep code blocks 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.