From: Ɓukasz Langa Date: Thu, 22 Mar 2018 00:37:16 +0000 (-0700) Subject: Mention how stdio handling works X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/79b720ca9fef431ba03d28be3c37b67ed28aec71?ds=sidebyside Mention how stdio handling works Fixes #57 --- 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.