diff --git a/application.py b/application.py index c48d367..6da4890 100755 --- a/application.py +++ b/application.py @@ -1112,8 +1112,13 @@ if __name__ == "__main__": # if we used a pipe to read some data, that will be our first buffer if opts.pipe: - raise Exception("--pipe doesn't work yet") data = sys.stdin.read() + # since we just read until EOF from stdin, we need to reset STDIN using + # the TTY. + tty = open('/dev/tty', 'r') + os.dup2(tty.fileno(), sys.stdin.fileno()) + + # ok, so now create the actual buffer b = buffer.data.DataBuffer('*Pipe*', data) b.open() buffers.append(b)