Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting input and output #279

Closed
ruyadorno opened this issue Sep 3, 2015 · 5 comments
Closed

Allow setting input and output #279

ruyadorno opened this issue Sep 3, 2015 · 5 comments

Comments

@ruyadorno
Copy link
Contributor

Resurrecting the ideas from #188 #197

I just stumbled upon a use case where having the ttys module support that @naholyr added would have saved the day (basically reading from stdin and prompting user with info taken from there).

By reading through the history of these PRs it seems to me that ttys turned out to be a very unreliable module that unfortunately only worked on some terminals and eventually all the changes got reverted 😞

@SBoudrias would you be open to implement back the possibility of setting input/output but defaulting to process.stdin/process.stdout instead? That would at least allow use cases like the one I have to deal with now, to opt-in for ttys or to use some other better solution in the future.

@SBoudrias
Copy link
Owner

Yes, I totally want to allow a user to set input/output stream manually.

It just requires a bit of a refactor.

@ruyadorno
Copy link
Contributor Author

would it be the same refactor from #197 ? (excluding adding ttys again of course)

@SBoudrias
Copy link
Owner

Similar to it yes, but I'm pretty sure there's place where we're calling process.stdout directly. I remove them as I fall on them, but there might be some still around.

@ruyadorno
Copy link
Contributor Author

got it, I might give it a try and send a PR in the next few days 😊 thanks!

ruyadorno added a commit to ruyadorno/Inquirer.js that referenced this issue Sep 5, 2015
SBoudrias added a commit that referenced this issue Sep 7, 2015
Adds an option to configure input/output streams, fixes #279
@naholyr
Copy link
Contributor

naholyr commented Sep 7, 2015

Well done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants