More refactoring
[xyz.git] / src / Prompts.hs
index 72530d6..aa54876 100644 (file)
@@ -1,11 +1,4 @@
-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)
@@ -50,7 +43,7 @@ yornPrompt xs = do
                    "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
@@ -82,3 +75,5 @@ initPrompt themes = fmap (zip ["projectName", "description", "theme"]) $ sequenc
     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?"