slightly improve help layout
This commit is contained in:
		
							parent
							
								
									e005625780
								
							
						
					
					
						commit
						02a43f1e40
					
				@ -117,7 +117,7 @@ fileflags = [
 | 
				
			|||||||
reportflags = [
 | 
					reportflags = [
 | 
				
			||||||
  flagReq  ["begin","b"]     (\s opts -> Right $ setopt "begin" s opts) "DATE" "report on transactions on or after this date"
 | 
					  flagReq  ["begin","b"]     (\s opts -> Right $ setopt "begin" s opts) "DATE" "report on transactions on or after this date"
 | 
				
			||||||
 ,flagReq  ["end","e"]       (\s opts -> Right $ setopt "end" s opts) "DATE" "report on transactions before this date"
 | 
					 ,flagReq  ["end","e"]       (\s opts -> Right $ setopt "end" s opts) "DATE" "report on transactions before this date"
 | 
				
			||||||
 ,flagReq  ["period","p"]    (\s opts -> Right $ setopt "period" s opts) "PERIODEXPR" "report on transactions during the specified period and/or with the specified reporting interval"
 | 
					 ,flagReq  ["period","p"]    (\s opts -> Right $ setopt "period" s opts) "PERIODEXP" "report on transactions during the specified period and/or with the specified reporting interval"
 | 
				
			||||||
 ,flagNone ["daily","D"]     (\opts -> setboolopt "daily" opts) "report by day"
 | 
					 ,flagNone ["daily","D"]     (\opts -> setboolopt "daily" opts) "report by day"
 | 
				
			||||||
 ,flagNone ["weekly","W"]    (\opts -> setboolopt "weekly" opts) "report by week"
 | 
					 ,flagNone ["weekly","W"]    (\opts -> setboolopt "weekly" opts) "report by week"
 | 
				
			||||||
 ,flagNone ["monthly","M"]   (\opts -> setboolopt "monthly" opts) "report by month"
 | 
					 ,flagNone ["monthly","M"]   (\opts -> setboolopt "monthly" opts) "report by month"
 | 
				
			||||||
@ -127,7 +127,7 @@ reportflags = [
 | 
				
			|||||||
 ,flagNone ["uncleared","U"] (\opts -> setboolopt "uncleared" opts) "report only on uncleared transactions"
 | 
					 ,flagNone ["uncleared","U"] (\opts -> setboolopt "uncleared" opts) "report only on uncleared transactions"
 | 
				
			||||||
 ,flagNone ["cost","B"]      (\opts -> setboolopt "cost" opts) "report cost of commodities"
 | 
					 ,flagNone ["cost","B"]      (\opts -> setboolopt "cost" opts) "report cost of commodities"
 | 
				
			||||||
 ,flagReq  ["depth"]         (\s opts -> Right $ setopt "depth" s opts) "N" "hide accounts/transactions deeper than this"
 | 
					 ,flagReq  ["depth"]         (\s opts -> Right $ setopt "depth" s opts) "N" "hide accounts/transactions deeper than this"
 | 
				
			||||||
 ,flagReq  ["display","d"]   (\s opts -> Right $ setopt "display" s opts) "DISPLAYEXPR" "show only transactions matching the expr, which is 'dOP[DATE]' where OP is <, <=, =, >=, >"
 | 
					 ,flagReq  ["display","d"]   (\s opts -> Right $ setopt "display" s opts) "DISPLAYEXP" "show only transactions matching the expression, which is 'dOP[DATE]' where OP is <, <=, =, >=, >"
 | 
				
			||||||
 ,flagNone ["effective"]     (\opts -> setboolopt "effective" opts) "use transactions' effective dates, if any"
 | 
					 ,flagNone ["effective"]     (\opts -> setboolopt "effective" opts) "use transactions' effective dates, if any"
 | 
				
			||||||
 ,flagNone ["empty","E"]     (\opts -> setboolopt "empty" opts) "show empty/zero things which are normally elided"
 | 
					 ,flagNone ["empty","E"]     (\opts -> setboolopt "empty" opts) "show empty/zero things which are normally elided"
 | 
				
			||||||
 ,flagNone ["real","R"]      (\opts -> setboolopt "real" opts) "report only on real (non-virtual) transactions"
 | 
					 ,flagNone ["real","R"]      (\opts -> setboolopt "real" opts) "report only on real (non-virtual) transactions"
 | 
				
			||||||
@ -393,7 +393,7 @@ maybesmartdateopt d name rawopts =
 | 
				
			|||||||
                    Just
 | 
					                    Just
 | 
				
			||||||
                    $ fixSmartDateStrEither' d s
 | 
					                    $ fixSmartDateStrEither' d s
 | 
				
			||||||
 | 
					
 | 
				
			||||||
maybedisplayopt :: Day -> RawOpts -> Maybe DisplayExpr
 | 
					maybedisplayopt :: Day -> RawOpts -> Maybe DisplayExp
 | 
				
			||||||
maybedisplayopt d rawopts =
 | 
					maybedisplayopt d rawopts =
 | 
				
			||||||
    maybe Nothing (Just . regexReplaceBy "\\[.+?\\]" fixbracketeddatestr) $ maybestringopt "display" rawopts
 | 
					    maybe Nothing (Just . regexReplaceBy "\\[.+?\\]" fixbracketeddatestr) $ maybestringopt "display" rawopts
 | 
				
			||||||
    where
 | 
					    where
 | 
				
			||||||
 | 
				
			|||||||
@ -11,7 +11,7 @@ on the command-line options, should move to hledger-lib later.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
module Hledger.Cli.Reports (
 | 
					module Hledger.Cli.Reports (
 | 
				
			||||||
  ReportOpts(..),
 | 
					  ReportOpts(..),
 | 
				
			||||||
  DisplayExpr,
 | 
					  DisplayExp,
 | 
				
			||||||
  FormatStr,
 | 
					  FormatStr,
 | 
				
			||||||
  defreportopts,
 | 
					  defreportopts,
 | 
				
			||||||
  dateSpanFromOpts,
 | 
					  dateSpanFromOpts,
 | 
				
			||||||
@ -72,7 +72,7 @@ data ReportOpts = ReportOpts {
 | 
				
			|||||||
    ,uncleared_      :: Bool
 | 
					    ,uncleared_      :: Bool
 | 
				
			||||||
    ,cost_           :: Bool
 | 
					    ,cost_           :: Bool
 | 
				
			||||||
    ,depth_          :: Maybe Int
 | 
					    ,depth_          :: Maybe Int
 | 
				
			||||||
    ,display_        :: Maybe DisplayExpr
 | 
					    ,display_        :: Maybe DisplayExp
 | 
				
			||||||
    ,effective_      :: Bool
 | 
					    ,effective_      :: Bool
 | 
				
			||||||
    ,empty_          :: Bool
 | 
					    ,empty_          :: Bool
 | 
				
			||||||
    ,no_elide_       :: Bool
 | 
					    ,no_elide_       :: Bool
 | 
				
			||||||
@ -89,7 +89,7 @@ data ReportOpts = ReportOpts {
 | 
				
			|||||||
    ,patterns_       :: [String]
 | 
					    ,patterns_       :: [String]
 | 
				
			||||||
 } deriving (Show)
 | 
					 } deriving (Show)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type DisplayExpr = String
 | 
					type DisplayExp = String
 | 
				
			||||||
type FormatStr = String
 | 
					type FormatStr = String
 | 
				
			||||||
 | 
					
 | 
				
			||||||
defreportopts = ReportOpts
 | 
					defreportopts = ReportOpts
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user