cli: Commands.Aregister: replace option --no-header by --header=YN

This commit is contained in:
Henning Thielemann 2024-10-23 17:19:29 +02:00 committed by Simon Michael
parent 1a9bfcf5be
commit e43168533f
2 changed files with 5 additions and 5 deletions

View File

@ -57,8 +57,8 @@ aregistermode = hledgerCommandMode
-- "show running average of posting amounts instead of total (implies --empty)"
-- ,flagNone ["related","r"] (setboolopt "related") "show postings' siblings instead"
,flagNone ["invert"] (setboolopt "invert") "display all amounts with reversed sign"
,flagNone ["no-header"] (setboolopt "no-header")
"omit header row in table output"
,flagReq ["header"] (\s opts -> Right $ setopt "header" s opts) "YN"
"show header row above table: yes (default) or no"
,flagReq ["width","w"] (\s opts -> Right $ setopt "width" s opts) "N"
("set output width (default: " ++
#ifdef mingw32_HOST_OS
@ -219,7 +219,7 @@ accountTransactionsReportAsText copts reportq thisacctq items = TB.toLazyText $
&& not (queryIsNull $ filterQuery (not.(\q->queryIsDepth q || queryIsDateOrDate2 q)) reportq)
headeropt :: CliOpts -> Bool
headeropt = not . boolopt "no-header" . rawopts_
headeropt = fromMaybe True . maybeynopt "header" . rawopts_
optional :: (Monoid p) => Bool -> p -> p
optional b x = if b then x else mempty

View File

@ -13,7 +13,7 @@ Flags:
--no-elide don't show only 2 commodities per amount
--cumulative show running total from report start date
--invert display all amounts with reversed sign
--no-header omit header row in table output
--header=YN show header row above table: yes (default) or no
-w --width=N set output width (default: terminal width or
$COLUMNS). -wN,M sets description width as well.
--align-all guarantee alignment across all lines (slower)
@ -79,7 +79,7 @@ at the cost of more time and memory, use the `--align-all` flag.
By default, `aregister` shows a header above the data.
However, when reporting in a language different from English,
it is easier to omit this header and prepend your own one.
For this purpose, use the `--no-header` option.
For this purpose, use the `--header=no` option.
This command also supports the
[output destination](hledger.html#output-destination) and