Skip to content

Commit e431685

Browse files
thielemasimonmichael
authored andcommitted
cli: Commands.Aregister: replace option --no-header by --header=YN
1 parent 1a9bfcf commit e431685

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

hledger/Hledger/Cli/Commands/Aregister.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ aregistermode = hledgerCommandMode
5757
-- "show running average of posting amounts instead of total (implies --empty)"
5858
-- ,flagNone ["related","r"] (setboolopt "related") "show postings' siblings instead"
5959
,flagNone ["invert"] (setboolopt "invert") "display all amounts with reversed sign"
60-
,flagNone ["no-header"] (setboolopt "no-header")
61-
"omit header row in table output"
60+
,flagReq ["header"] (\s opts -> Right $ setopt "header" s opts) "YN"
61+
"show header row above table: yes (default) or no"
6262
,flagReq ["width","w"] (\s opts -> Right $ setopt "width" s opts) "N"
6363
("set output width (default: " ++
6464
#ifdef mingw32_HOST_OS
@@ -219,7 +219,7 @@ accountTransactionsReportAsText copts reportq thisacctq items = TB.toLazyText $
219219
&& not (queryIsNull $ filterQuery (not.(\q->queryIsDepth q || queryIsDateOrDate2 q)) reportq)
220220

221221
headeropt :: CliOpts -> Bool
222-
headeropt = not . boolopt "no-header" . rawopts_
222+
headeropt = fromMaybe True . maybeynopt "header" . rawopts_
223223

224224
optional :: (Monoid p) => Bool -> p -> p
225225
optional b x = if b then x else mempty

hledger/Hledger/Cli/Commands/Aregister.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Flags:
1313
--no-elide don't show only 2 commodities per amount
1414
--cumulative show running total from report start date
1515
--invert display all amounts with reversed sign
16-
--no-header omit header row in table output
16+
--header=YN show header row above table: yes (default) or no
1717
-w --width=N set output width (default: terminal width or
1818
$COLUMNS). -wN,M sets description width as well.
1919
--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.
7979
By default, `aregister` shows a header above the data.
8080
However, when reporting in a language different from English,
8181
it is easier to omit this header and prepend your own one.
82-
For this purpose, use the `--no-header` option.
82+
For this purpose, use the `--header=no` option.
8383

8484
This command also supports the
8585
[output destination](hledger.html#output-destination) and

0 commit comments

Comments
 (0)