diff --git a/hledger/Hledger/Cli/Cashflow.hs b/hledger/Hledger/Cli/Cashflow.hs index 5344f2728..7afcc3af5 100644 --- a/hledger/Hledger/Cli/Cashflow.hs +++ b/hledger/Hledger/Cli/Cashflow.hs @@ -27,7 +27,10 @@ import Hledger.Cli.Balance cashflowmode = (defCommandMode ["cashflow","cf"]) { modeHelp = "show a cashflow statement" `withAliases` ["cf"] ,modeGroupFlags = Group { - groupUnnamed = [] + groupUnnamed = [ + flagNone ["flat"] (\opts -> setboolopt "flat" opts) "show full account names, unindented" + ,flagReq ["drop"] (\s opts -> Right $ setopt "drop" s opts) "N" "with --flat, omit this many leading account name components" + ] ,groupHidden = [] ,groupNamed = [generalflagsgroup1] } diff --git a/hledger/Hledger/Cli/Incomestatement.hs b/hledger/Hledger/Cli/Incomestatement.hs index ab83a0839..c7cd1b2c8 100644 --- a/hledger/Hledger/Cli/Incomestatement.hs +++ b/hledger/Hledger/Cli/Incomestatement.hs @@ -24,7 +24,10 @@ import Hledger.Cli.Balance incomestatementmode = (defCommandMode $ ["incomestatement"]++aliases) { modeHelp = "show an income statement" `withAliases` aliases ,modeGroupFlags = Group { - groupUnnamed = [] + groupUnnamed = [ + flagNone ["flat"] (\opts -> setboolopt "flat" opts) "show full account names, unindented" + ,flagReq ["drop"] (\s opts -> Right $ setopt "drop" s opts) "N" "with --flat, omit this many leading account name components" + ] ,groupHidden = [] ,groupNamed = [generalflagsgroup1] }