PabloRMira / sql_formatter

A Python based SQL formatter
https://pablormira.github.io/sql_formatter/
Apache License 2.0
43 stars 10 forks source link

Support reading from standard input #175

Open spookylukey opened 1 year ago

spookylukey commented 1 year ago

I'd like to be able to pass input from a pipe and format it:

some_command | sql-formatter -

Here - is the conventional way of indicating that input is not a file but stdin. (See man cat for an example of this). In this case, sql-formatter should output to stdout by default.