-module Prompts (
- textPrompt,
- nonEmptyTextPrompt,
- yornPrompt,
- subPrompt,
- entryPrompt,
- initPrompt
- ) where
+module Prompts (entryPrompt, initPrompt, pushPrompt) where
import Util
import Prelude hiding (getLine, null, putStrLn, putStr, unlines)
"y" -> Right True
"n" -> Right False
_ -> Left "Please answer with y or n"
- prompt (xs +++ " (y/n):") getOneText v
+ prompt (xs +++ " (y/n): ") getOneText v
listPrompt :: Text -> [Text] -> IO Text
listPrompt xs options = do
nonEmptyTextPrompt "Enter a short description for your project: ",
listPrompt "Which theme would you like to use?" themes
]
+
+pushPrompt = yornPrompt "Do you want to push this entry?"