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.
This adds -b / --buffer-size to the peco binary. It basically limits the
maximum number of lines that peco will hold at any given time, allowing
you to keep peco running for a long time, even when you are receiving an
infinite stream of lines.
By default the buffer size is unlimited. If --buffer-size is specified,
lines will be thrown away in FIFO order