Skip to content

Commit

Permalink
cli: Commands.Aregister: replace option --no-header by --header=YN
Browse files Browse the repository at this point in the history
  • Loading branch information
thielema authored and simonmichael committed Oct 24, 2024
1 parent 1a9bfcf commit e431685
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions hledger/Hledger/Cli/Commands/Aregister.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions hledger/Hledger/Cli/Commands/Aregister.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e431685

Please sign in to comment.