peco/peco — pull request #148 by lestrrat (2014-07-07 00:49:20+00:00)
Title: Delay the terminal initialization until incoming buffer is ready

This change fixes #144 by delaying all the terminal initialization
until there's something coming in from the standard input.

Without this, for example, a succesive chain of commands that expect to
use stdin will fail, because peco might accidentally grab the stdin
under the hood. With this change, peco is forced to wait to do any
terminal related stuff until some output has been spewed by the
previous command (which is most likely when the command is ready to
give up the control of the terminal), so things work again.