mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-09 21:22:26 +03:00
;lib: clarify choiceopt doc
This commit is contained in:
parent
8b4ae4cd43
commit
3f0892556d
@ -55,9 +55,9 @@ inRawOpts name = isJust . lookup name . unRawOpts
|
||||
boolopt :: String -> RawOpts -> Bool
|
||||
boolopt = inRawOpts
|
||||
|
||||
-- | Get latests successfully parsed flag.
|
||||
--
|
||||
-- Expected to be used for exclusive choice flags like "--json" vs "--csv".
|
||||
-- | From a list of RawOpts, get the last one (ie the right-most on the command line)
|
||||
-- for which the given predicate returns a Just value.
|
||||
-- Useful for exclusive choice flags like --daily|--weekly|--quarterly...
|
||||
--
|
||||
-- >>> choiceopt Just (RawOpts [("a",""), ("b",""), ("c","")])
|
||||
-- Just "c"
|
||||
|
Loading…
Reference in New Issue
Block a user