diff options
Diffstat (limited to 'Command/FromKey.hs')
-rw-r--r-- | Command/FromKey.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Command/FromKey.hs b/Command/FromKey.hs index 10484b840..ebc0e6f6e 100644 --- a/Command/FromKey.hs +++ b/Command/FromKey.hs @@ -41,10 +41,10 @@ start _ [] = do start _ _ = error "specify a key and a dest file" massAdd :: CommandPerform -massAdd = go True =<< map words . lines <$> liftIO getContents +massAdd = go True =<< map (separate (== ' ')) . lines <$> liftIO getContents where go status [] = next $ return status - go status ([keyname,f]:rest) = do + go status ((keyname,f):rest) | not (null keyname) && not (null f) = do let key = fromMaybe (error $ "bad key " ++ keyname) $ file2key keyname ok <- perform' key f let !status' = status && ok |