incomestatement, cashflow: support --flat and --drop as well

This commit is contained in:
Simon Michael 2014-03-21 17:41:22 -07:00
parent 5a8b5ed082
commit d815cca069
2 changed files with 8 additions and 2 deletions

View File

@ -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]
}

View File

@ -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]
}