Commit 235184ee authored by Nicolas Lenz's avatar Nicolas Lenz

Allow "-" as command for reading from stdin

parent aa0439a1
......@@ -24,7 +24,7 @@ If you're using Arch Linux: there is also an [AUR package](https://aur.archlinux
You can get help a list of possible mock styles with `mock`.
If no text is given, input is read from `stdin`.
If no text or "-" is given, input is read from `stdin`.
### Examples
......
......@@ -22,6 +22,9 @@ main = do
[style] -> do
input <- T.getContents -- Read from stdin
T.putStrLn $ handle style [input]
[style, "-"] -> do
input <- T.getContents -- Read from stdin
T.putStrLn $ handle style [input]
(style:str) -> T.putStrLn $ handle style str
-- |Returns an IO action handling the given list of arguments.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment