;doc: change flags marker in command helps to suit latest pandoc

From _FLAGS_ to $FLAGS$, since latest pandoc strips the underscores
at a certain point in our docs rendering.
This commit is contained in:
Simon Michael 2020-01-04 18:29:01 -08:00
parent 412ea86a2d
commit c186eb6084
61 changed files with 69 additions and 68 deletions

View File

@ -209,6 +209,7 @@ The journal file path when not specified with `-f`.
Default: `~/.hledger.journal` (on windows, perhaps `C:/Users/USER/.hledger.journal`).
}} )m4_dnl
m4_dnl
m4_dnl Dummy macro to strip _FLAGS_ marker in command docs.
m4_define({{_FLAGS_}}, {{}})m4_dnl
m4_dnl Dummy macro to strip $FLAGS$ marker in command docs.
m4_dnl Not using underscore here, because latest pandoc strips those.
m4_define({{$FLAGS$}}, {{}})m4_dnl
m4_dnl

View File

@ -303,9 +303,9 @@ hledgerCommandMode doc unnamedflaggroup namedflaggroups hiddenflaggroup argsdesc
--
-- - First line: the command name then any aliases, as one or more space or comma-separated words
--
-- - Second line to a line containing just _FLAGS_, or the end: the short help
-- - Second line to a line containing just $FLAGS$, or the end: the short help
--
-- - Any lines after _FLAGS_: the long help (split into lines for cmdargs)
-- - Any lines after $FLAGS$: the long help (split into lines for cmdargs)
--
-- The CLI help displays the short help, then the cmdargs-generated
-- flags list, then the long help (which some day we might make
@ -319,7 +319,7 @@ parseCommandDoc t =
(l:ls) -> Just (names, shorthelp, longhelplines)
where
names = words $ map (\c -> if c `elem` [',','\\'] then ' ' else c) l
(shorthelpls, longhelpls) = break (== "_FLAGS_") ls
(shorthelpls, longhelpls) = break (== "$FLAGS$") ls
shorthelp = unlines $ reverse $ dropWhile null $ reverse shorthelpls
longhelplines = dropWhile null $ drop 1 longhelpls

View File

@ -1,7 +1,7 @@
accounts, a\
Show account names.
_FLAGS_
$FLAGS$
This command lists account names, either declared with account directives
(--declared), posted to (--used), or both (the default).

View File

@ -1,7 +1,7 @@
accounts, a
Show account names.
_FLAGS_
$FLAGS$
This command lists account names, either declared with account
directives (--declared), posted to (--used), or both (the default). With

View File

@ -1,7 +1,7 @@
activity\
Show an ascii barchart of posting counts per interval.
_FLAGS_
$FLAGS$
The activity command displays an ascii histogram showing transaction
counts by day, week, month or other reporting interval (by day is the

View File

@ -1,7 +1,7 @@
activity
Show an ascii barchart of posting counts per interval.
_FLAGS_
$FLAGS$
The activity command displays an ascii histogram showing transaction
counts by day, week, month or other reporting interval (by day is the

View File

@ -1,7 +1,7 @@
add\
Prompt for transactions and add them to the journal.
_FLAGS_
$FLAGS$
Many hledger users edit their journals directly with a text editor, or generate them from CSV.
For more interactive data entry, there is the `add` command,

View File

@ -1,7 +1,7 @@
add
Prompt for transactions and add them to the journal.
_FLAGS_
$FLAGS$
Many hledger users edit their journals directly with a text editor, or
generate them from CSV. For more interactive data entry, there is the

View File

@ -1,7 +1,7 @@
balance, bal, b\
Show accounts and their balances.
_FLAGS_
$FLAGS$
The balance command is hledger's most versatile command.
Note, despite the name, it is not always used for showing real-world account balances;

View File

@ -1,7 +1,7 @@
balance, bal, b
Show accounts and their balances.
_FLAGS_
$FLAGS$
The balance command is hledger's most versatile command. Note, despite
the name, it is not always used for showing real-world account balances;

View File

@ -8,7 +8,7 @@ Note this report shows all account balances with normal positive sign
(like conventional financial statements, unlike balance/print/register)
(experimental).
_FLAGS_
$FLAGS$
Example:

View File

@ -8,7 +8,7 @@ Note this report shows all account balances with normal positive sign
(like conventional financial statements, unlike balance/print/register)
(experimental).
_FLAGS_
$FLAGS$
Example:

View File

@ -2,7 +2,7 @@ balancesheetequity, bse\
Just like [balancesheet](#balancesheet), but also reports Equity
(which it assumes is under a top-level `equity` account).
_FLAGS_
$FLAGS$
Example:
```shell

View File

@ -2,7 +2,7 @@ balancesheetequity, bse
Just like balancesheet, but also reports Equity (which it assumes is
under a top-level equity account).
_FLAGS_
$FLAGS$
Example:

View File

@ -7,7 +7,7 @@ Note this report shows all account balances with normal positive sign
(like conventional financial statements, unlike balance/print/register)
(experimental).
_FLAGS_
$FLAGS$
Example:
```shell

View File

@ -6,7 +6,7 @@ contain receivable or A/R in their name. Note this report shows all
account balances with normal positive sign (like conventional financial
statements, unlike balance/print/register) (experimental).
_FLAGS_
$FLAGS$
Example:

View File

@ -5,4 +5,4 @@ With --strict, dates must also be unique.
With a query, only matched transactions' dates are checked.
Reads the default journal file, or another specified with -f.
_FLAGS_
$FLAGS$

View File

@ -4,4 +4,4 @@ checks secondary dates instead. With --strict, dates must also be
unique. With a query, only matched transactions' dates are checked.
Reads the default journal file, or another specified with -f.
_FLAGS_
$FLAGS$

View File

@ -3,6 +3,6 @@ Reports account names having the same leaf but different prefixes.
In other words, two or more leaves that are categorized differently.
Reads the default journal file, or another specified as an argument.
_FLAGS_
$FLAGS$
An example: http://stefanorodighiero.net/software/hledger-dupes.html

View File

@ -3,6 +3,6 @@ Reports account names having the same leaf but different prefixes. In
other words, two or more leaves that are categorized differently. Reads
the default journal file, or another specified as an argument.
_FLAGS_
$FLAGS$
An example: http://stefanorodighiero.net/software/hledger-dupes.html

View File

@ -5,7 +5,7 @@ Useful for bringing asset/liability balances forward into a new journal file,
or for closing out revenues/expenses to retained earnings at the end of a
period.
_FLAGS_
$FLAGS$
The closing transaction transfers balances to "equity:closing balances",
and the opening transaction transfers balances from "equity:opening balances",

View File

@ -5,7 +5,7 @@ Useful for bringing asset/liability balances forward into a new journal
file, or for closing out revenues/expenses to retained earnings at the
end of a period.
_FLAGS_
$FLAGS$
The closing transaction transfers balances to "equity:closing balances",
and the opening transaction transfers balances from "equity:opening
@ -51,8 +51,8 @@ Examples:
Carrying asset/liability balances into a new file for 2019, all from
command line:
_Warning: we use >> here to append; be careful not to type a single >
which would wipe your journal!_
Warning: we use >> here to append; be careful not to type a single >
which would wipe your journal!
$ hledger close -f 2018.journal -e 2019 assets liabilities --opening >>2019.journal
$ hledger close -f 2018.journal -e 2019 assets liabilities --closing >>2018.journal

View File

@ -1,4 +1,4 @@
commodities\
List all commodity/currency symbols used or declared in the journal.
_FLAGS_
$FLAGS$

View File

@ -1,4 +1,4 @@
commodities
List all commodity/currency symbols used or declared in the journal.
_FLAGS_
$FLAGS$

View File

@ -1,7 +1,7 @@
descriptions
Show descriptions.
_FLAGS_
$FLAGS$
This command lists all descriptions that appear in transactions.

View File

@ -1,6 +1,6 @@
descriptions Show descriptions.
_FLAGS_
$FLAGS$
This command lists all descriptions that appear in transactions.

View File

@ -15,7 +15,7 @@ from your bank (eg as CSV data). When hledger and your bank disagree
about the account balance, you can compare the bank data with your
journal to find out the cause.
_FLAGS_
$FLAGS$
Examples:

View File

@ -14,7 +14,7 @@ your bank (eg as CSV data). When hledger and your bank disagree about
the account balance, you can compare the bank data with your journal to
find out the cause.
_FLAGS_
$FLAGS$
Examples:

View File

@ -2,4 +2,4 @@ files\
List all files included in the journal. With a REGEX argument,
only file names matching the regular expression (case sensitive) are shown.
_FLAGS_
$FLAGS$

View File

@ -2,4 +2,4 @@ files
List all files included in the journal. With a REGEX argument, only file
names matching the regular expression (case sensitive) are shown.
_FLAGS_
$FLAGS$

View File

@ -1,7 +1,7 @@
help\
Show any of the hledger manuals.
_FLAGS_
$FLAGS$
The `help` command displays any of the main [hledger manuals](/docs.html), in one of several ways.
Run it with no argument to list the manuals, or provide a full or partial manual name to select one.

View File

@ -1,7 +1,7 @@
help
Show any of the hledger manuals.
_FLAGS_
$FLAGS$
The help command displays any of the main hledger manuals, in one of
several ways. Run it with no argument to list the manuals, or provide a

View File

@ -4,7 +4,7 @@ the main journal file. Or with --dry-run, just print the transactions
that would be added. Or with --catchup, just mark all of the FILEs'
transactions as imported, without actually importing any.
_FLAGS_
$FLAGS$
The input files are specified as arguments - no need to write -f before each one.
So eg to add new transactions from all CSV files to the main journal, it's just:

View File

@ -4,7 +4,7 @@ the main journal file. Or with --dry-run, just print the transactions
that would be added. Or with --catchup, just mark all of the FILEs'
transactions as imported, without actually importing any.
_FLAGS_
$FLAGS$
The input files are specified as arguments - no need to write -f before
each one. So eg to add new transactions from all CSV files to the main

View File

@ -7,7 +7,7 @@ Note this report shows all account balances with normal positive sign
(like conventional financial statements, unlike balance/print/register)
(experimental).
_FLAGS_
$FLAGS$
This command displays a simple
[income statement](http://en.wikipedia.org/wiki/Income_statement). It

View File

@ -6,7 +6,7 @@ forms also allowed). Note this report shows all account balances with
normal positive sign (like conventional financial statements, unlike
balance/print/register) (experimental).
_FLAGS_
$FLAGS$
This command displays a simple income statement. It currently assumes
that you have top-level accounts named income (or revenue) and expense

View File

@ -1,7 +1,7 @@
notes
Show notes.
_FLAGS_
$FLAGS$
This command lists all notes that appear in transactions.

View File

@ -1,6 +1,6 @@
notes Show notes.
_FLAGS_
$FLAGS$
This command lists all notes that appear in transactions.

View File

@ -1,7 +1,7 @@
payees
Show payee names.
_FLAGS_
$FLAGS$
This command lists all payee names that appear in transactions.

View File

@ -1,6 +1,6 @@
payees Show payee names.
_FLAGS_
$FLAGS$
This command lists all payee names that appear in transactions.

View File

@ -5,4 +5,4 @@ With --inverted-costs, also print inverse prices based on transaction prices.
Prices (and postings providing prices) can be filtered by a query.
Price amounts are always displayed with their full precision.
_FLAGS_
$FLAGS$

View File

@ -5,4 +5,4 @@ synthetic market prices based on transaction prices. With
Prices (and postings providing prices) can be filtered by a query. Price
amounts are always displayed with their full precision.
_FLAGS_
$FLAGS$

View File

@ -1,7 +1,7 @@
print, txns, p\
Show transaction journal entries, sorted by date.
_FLAGS_
$FLAGS$
The print command displays full journal entries (transactions) from
the journal file in date order, tidily formatted.

View File

@ -1,7 +1,7 @@
print, txns, p
Show transaction journal entries, sorted by date.
_FLAGS_
$FLAGS$
The print command displays full journal entries (transactions) from the
journal file in date order, tidily formatted. With --date2, transactions

View File

@ -1,7 +1,7 @@
print-unique\
Print transactions which do not reuse an already-seen description.
_FLAGS_
$FLAGS$
Example:

View File

@ -1,7 +1,7 @@
print-unique
Print transactions which do not reuse an already-seen description.
_FLAGS_
$FLAGS$
Example:

View File

@ -58,12 +58,12 @@ Here are more special features/conventions of command doc files (see
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
$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.
- Long help (as many paragraphs as needed) follows the $FLAGS$ marker.
This often ends with one or more examples.

View File

@ -1,7 +1,7 @@
register, reg, r\
Show postings and their running total.
_FLAGS_
$FLAGS$
The register command displays postings in date order, one per line,
and their running total. This is typically used with a

View File

@ -1,7 +1,7 @@
register, reg, r
Show postings and their running total.
_FLAGS_
$FLAGS$
The register command displays postings in date order, one per line, and
their running total. This is typically used with a query selecting a
@ -32,7 +32,7 @@ the whole report period). This flag implies --empty (see below). It is
affected by --historical. It works best when showing just one account
and one commodity.
The --related/-r flag shows the _other_ postings in the transactions of
The --related/-r flag shows the other postings in the transactions of
the postings which would normally be shown.
The --invert flag negates all amounts. For example, it can be used on an

View File

@ -5,4 +5,4 @@ If there are multiple equally good matches, it shows the most recent.
Query options (options, not arguments) can be used to restrict the search space.
Helps ledger-autosync detect already-seen transactions when importing.
_FLAGS_
$FLAGS$

View File

@ -5,4 +5,4 @@ matches, it shows the most recent. Query options (options, not
arguments) can be used to restrict the search space. Helps
ledger-autosync detect already-seen transactions when importing.
_FLAGS_
$FLAGS$

View File

@ -2,7 +2,7 @@ rewrite\
Print all transactions, rewriting the postings of matched transactions.
For now the only rewrite available is adding new postings, like print --auto.
_FLAGS_
$FLAGS$
This is a start at a generic rewriter of transaction entries.
It reads the default journal and prints the transactions, like print,

View File

@ -3,7 +3,7 @@ Print all transactions, rewriting the postings of matched transactions.
For now the only rewrite available is adding new postings, like print
--auto.
_FLAGS_
$FLAGS$
This is a start at a generic rewriter of transaction entries. It reads
the default journal and prints the transactions, like print, but adds

View File

@ -2,7 +2,7 @@ roi\
Shows the time-weighted (TWR) and money-weighted (IRR) rate of return
on your investments.
_FLAGS_
$FLAGS$
This command assumes that you have account(s) that hold nothing but
your investments and whenever you record current appraisal/valuation

View File

@ -2,7 +2,7 @@ roi
Shows the time-weighted (TWR) and money-weighted (IRR) rate of return on
your investments.
_FLAGS_
$FLAGS$
This command assumes that you have account(s) that hold nothing but your
investments and whenever you record current appraisal/valuation of these

View File

@ -1,7 +1,7 @@
stats\
Show some journal statistics.
_FLAGS_
$FLAGS$
The stats command displays summary information for the whole journal, or
a matched part of it. With a [reporting interval](#reporting-interval),

View File

@ -1,7 +1,7 @@
stats
Show some journal statistics.
_FLAGS_
$FLAGS$
The stats command displays summary information for the whole journal, or
a matched part of it. With a reporting interval, it shows a report for

View File

@ -4,4 +4,4 @@ only tag names matching the regular expression (case insensitive) are shown.
With QUERY arguments, only transactions matching the query are considered.
With --values flag, the tags' unique values are listed instead.
_FLAGS_
$FLAGS$

View File

@ -5,4 +5,4 @@ shown. With QUERY arguments, only transactions matching the query are
considered. With --values flag, the tags' unique values are listed
instead.
_FLAGS_
$FLAGS$

View File

@ -1,7 +1,7 @@
test\
Run built-in unit tests.
_FLAGS_
$FLAGS$
This command runs the unit tests built in to hledger and hledger-lib,
printing the results on stdout. If any test fails, the exit code will

View File

@ -1,7 +1,7 @@
test
Run built-in unit tests.
_FLAGS_
$FLAGS$
This command runs the unit tests built in to hledger and hledger-lib,
printing the results on stdout. If any test fails, the exit code will be