SBoudrias/Inquirer.js — pull request #188 by naholyr (2014-11-12 02:38:39+00:00)
Title: Allow setting input and output (fixes issue with busy process.stdin)

Very useful with [ttys](https://github.com/TooTallNate/ttys) to allow querying user even if stdin is already used.

I use this modification in a script that should prompt user from a git hook, this is the only way to make it work properly.

```js
var ttys = require("ttys");

inquirer.prompt([
{"type": "input", "message": "Github username", "name": "user"},
{"type": "password", "message": "Github password", "name": "password"}
], function (answers) {
// …
}, {
input: ttys.stdin,
output: ttys.stdout
})
```