summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2020-08-26 21:35:35 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2020-08-26 21:35:35 +0200
commit581f10d9f1a2b0375358afd5eabc20c06956e261 (patch)
tree46acd15da2d8eaf936893b10c5a3086dd05b7ca8
parent08ddfb1c4efe532ba10fdf594626a3ad794bb65e (diff)
Ignore empty user input
-rw-r--r--src/Main.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 96186a8..044c6ad 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -122,6 +122,7 @@ interactiveLoop st bhost = runInputT defaultSettings $ do
let getInputLines prompt = do
Just input <- lift $ getInputLine prompt
case reverse input of
+ _ | all isSpace input -> getInputLines prompt
'\\':rest -> (reverse ('\n':rest) ++) <$> getInputLines ">> "
_ -> return input