By default it uses readline to read commands. If the input and output are not a tty, no prompt is shown.