Add argument shorthands

This commit is contained in:
rnhmjoj 2016-05-05 18:27:28 +02:00
parent 0c9898661e
commit d8ed744f2f
No known key found for this signature in database
GPG Key ID: 362BB82B7E496B7C

View File

@ -1,4 +1,6 @@
{-# LANGUAGE RecordWildCards #-}
-- | Main module
module Main where
import Control.Monad (when, forever)
import Data.Text (unpack)
@ -26,18 +28,22 @@ options :: Parser Options
options = Options
<$> switch
( long "interactive"
<> short 'i'
<> help "Manually insert numbers from a dice" )
<*> optional (option auto
( long "dictionary"
<> short 'd'
<> metavar "FILEPATH"
<> help "Specify dictionary filepath" ))
<*> option auto
( long "length"
<> short 'l'
<> value 6
<> metavar "N"
<> help "Number of words in a passphrase")
<*> option auto
( long "phrases"
<> short 'p'
<> value 1
<> metavar "M"
<> help "Number of passphrases to generate" )