mirror of
https://github.com/redelmann/scat
synced 2025-01-10 06:34:20 +01:00
Added missing documentation.
This commit is contained in:
parent
6608dce71e
commit
09fe0caf48
@ -43,6 +43,7 @@ scat = do
|
||||
printVerbose "Generated password:\n"
|
||||
liftIO $ putStrLn $ evalBuilder s $ scatter k pw
|
||||
|
||||
-- | Prints, if the verbosity level allows it.
|
||||
printVerbose :: String -> Scat ()
|
||||
printVerbose str = do
|
||||
v <- fmap verbose ask
|
||||
@ -77,6 +78,7 @@ getPassword = do
|
||||
printVerbose "Passwords do not match, please retry.\n"
|
||||
getPassConfirm
|
||||
|
||||
-- | Ask a password on the command line, with the specified prompt.
|
||||
askPassword :: String -> Scat C.ByteString
|
||||
askPassword str = do
|
||||
printVerbose str
|
||||
|
@ -33,6 +33,8 @@ data Options = Options
|
||||
-- ^ Indicates if the password must be confirmed. Activates verbosity.
|
||||
}
|
||||
|
||||
{- | Verbosity. If false, do not print anything but the generated password.
|
||||
True when @--verbose@ or @--confirmation@ are specified. -}
|
||||
verbose :: Options -> Bool
|
||||
verbose opts = verbose_ opts || confirm opts
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user