reading from tty for interactive commands