Skip to content

Commit

Permalink
extra/hledger-register-csv: accept -H/-A/-r (#206)
Browse files Browse the repository at this point in the history
hledger-register-csv.hs now accepts the same -H, -A and -r flags that
register does (but not -w, which wouldn't make sense).

Note: remember, when running add-ons with the hledger executable, most
add-on command flags must be preceded by --. So it's:

$ hledger register-csv -- -H
  • Loading branch information
simonmichael committed Oct 17, 2014
1 parent 69f53f7 commit e6bd0a3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions extra/hledger-register-csv.hs
Expand Up @@ -16,12 +16,16 @@ argsmode :: Mode RawOpts
argsmode = (defCommandMode ["register-csv"]) {
modeHelp = "show matched postings and running total as CSV"
,modeGroupFlags = Group {
groupNamed = [
groupUnnamed = [ -- copied from Register.hs:
flagNone ["historical","H"] (\opts -> setboolopt "historical" opts) "include prior postings in the running total"
,flagNone ["average","A"] (\opts -> setboolopt "average" opts) "show a running average instead of the running total (implies --empty)"
,flagNone ["related","r"] (\opts -> setboolopt "related" opts) "show postings' siblings instead"
]
,groupNamed = [
("Input",inputflags)
,("Reporting",reportflags)
,("Misc",helpflags)
]
,groupUnnamed = []
,groupHidden = []
}
}
Expand Down

0 comments on commit e6bd0a3

Please sign in to comment.