initial commit
This commit is contained in:
commit
70d3db13c7
17 changed files with 1109 additions and 0 deletions
36
app/ArgParser.hs
Normal file
36
app/ArgParser.hs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
module ArgParser where
|
||||
|
||||
import Options.Applicative
|
||||
|
||||
data Args = Args
|
||||
{ argAdd :: Maybe String
|
||||
, argDelete :: Maybe String
|
||||
, argCheck :: Maybe String
|
||||
, argTui :: Bool
|
||||
}
|
||||
|
||||
args :: Parser Args
|
||||
args =
|
||||
Args
|
||||
<$> optional
|
||||
( strOption
|
||||
( long "add"
|
||||
<> short 'a'
|
||||
<> help "add a new item"
|
||||
)
|
||||
)
|
||||
<*> optional
|
||||
( strOption
|
||||
( long "delete"
|
||||
<> short 'd'
|
||||
<> help "delete an item"
|
||||
)
|
||||
)
|
||||
<*> optional
|
||||
( strOption
|
||||
( long "check"
|
||||
<> short 'c'
|
||||
<> help "check an item"
|
||||
)
|
||||
)
|
||||
<*> switch (long "tui" <> short 't' <> help "launch a tui app powered by brick")
|
||||
Loading…
Add table
Add a link
Reference in a new issue