Commit 79b720ca authored by Łukasz Langa's avatar Łukasz Langa
Browse files

Mention how stdio handling works

Fixes #57
parent afff418f
Loading
Loading
Loading
Loading
+12 −0
Changes for README.md: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -54,6 +54,12 @@ Options:
  --help                      Show this message and exit.
```

`Black` is a well-behaved Unix-style command-line tool:
* it does nothing if no sources are passed to it;
* it will read from standard input and write to standard output if `-`
  is used as the filename;
* it only outputs messages to users on standard error.


## The philosophy behind *Black*

@@ -209,6 +215,12 @@ body.

* Visual Studio Code: [joslarson.black-vscode](https://marketplace.visualstudio.com/items?itemName=joslarson.black-vscode)

Any tool that can pipe code through *Black* using its stdio mode (just
[use `-` as the file name](http://www.tldp.org/LDP/abs/html/special-chars.html#DASHREF2)).
The formatted code will be returned on stdout (unless `--check` was
passed).  *Black* will still emit messages on stderr but that shouldn't
affect your use case.

There is currently no integration with any other text editors. Vim and
Atom/Nuclide integration is planned by the author, others will require
external contributions.