diff --git a/hledger/Hledger/Cli/Commands/Aregister.hs b/hledger/Hledger/Cli/Commands/Aregister.hs index b82257b5c16..322ce7735d1 100644 --- a/hledger/Hledger/Cli/Commands/Aregister.hs +++ b/hledger/Hledger/Cli/Commands/Aregister.hs @@ -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 diff --git a/hledger/Hledger/Cli/Commands/Aregister.md b/hledger/Hledger/Cli/Commands/Aregister.md index 4b37320753d..69981923dff 100644 --- a/hledger/Hledger/Cli/Commands/Aregister.md +++ b/hledger/Hledger/Cli/Commands/Aregister.md @@ -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