From 79b720ca9fef431ba03d28be3c37b67ed28aec71 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=81ukasz=20Langa?= Date: Wed, 21 Mar 2018 17:37:16 -0700 Subject: [PATCH] Mention how stdio handling works Fixes #57 --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index b5ebfa0..20ab4be 100644 --- a/README.md +++ b/README.md @@ -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. -- 2.39.5