Ticket #36 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

Print prefix even when stdin is not a terminal

Reported by: judah Owned by:
Priority: major Milestone:
Version: 0.2.1 Keywords:
Cc:

Description

If stdin is not a terminal, haskeline will not print the prefix. This can cause confusion during testing; in particular, see http://bugs.darcs.net/issue1050 .

We should always print the prefix. I think that's more commonly the right thing, and if a program dislikes that behavior it can use hIsTerminalDevice to decide whether to use a prefix or not.

Note as a corollary that we should make sure that echo is turned on in the above case (for the same ease of testing).

Change History

Changed 6 years ago by judah

  • status changed from new to closed
  • resolution set to fixed

In particular: the darcs test obliterate.pl checked darcs' behavior by looking for an output message which was displayed in the prefix. Since stdin was piped from another process, haskeline didn't print the prefix which caused the test to fail.

Now fixed.

Note: See TracTickets for help on using tickets.