mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-19 10:17:35 +03:00
lib: Hledger.Data.RawOptions: add unsetboolopt
This commit is contained in:
parent
d98dfedb9e
commit
7408bc02df
@ -11,6 +11,7 @@ module Hledger.Data.RawOptions (
|
||||
RawOpts,
|
||||
setopt,
|
||||
setboolopt,
|
||||
unsetboolopt,
|
||||
appendopts,
|
||||
inRawOpts,
|
||||
boolopt,
|
||||
@ -49,6 +50,9 @@ setopt name val = overRawOpts (++ [(name, val)])
|
||||
setboolopt :: String -> RawOpts -> RawOpts
|
||||
setboolopt name = overRawOpts (++ [(name,"")])
|
||||
|
||||
unsetboolopt :: String -> RawOpts -> RawOpts
|
||||
unsetboolopt name = overRawOpts (filter ((/=name).fst))
|
||||
|
||||
appendopts :: [(String,String)] -> RawOpts -> RawOpts
|
||||
appendopts new = overRawOpts (++new)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user