Merge pull request #17 from gbordyugov/read-stdin
Read stdin for SimpleSqlParserTool
This commit is contained in:
commit
372dcf91cc
|
@ -58,7 +58,7 @@ indent: parse then pretty print sql
|
|||
> getInput :: [String] -> IO (FilePath,String)
|
||||
> getInput as =
|
||||
> case as of
|
||||
> ["-"] -> error "read stdin"
|
||||
> ["-"] -> ("-",) <$> getContents
|
||||
> ("-c":as') -> return ("-", unwords as')
|
||||
> [filename] -> (filename,) <$> readFile filename
|
||||
> _ -> showHelp (Just "arguments not recognised") >> error ""
|
||||
|
|
Loading…
Reference in a new issue