Skip to content

Allow overriding whether ANSI escape sequences are output

Choose a tag to compare

@tanner0101 tanner0101 released this 30 Mar 23:32
7a97a5e
This patch was authored and released by @gwynne.
  • Particularly useful for implementing a command-line option of the form --color=yes|no|auto (corresponding to setting the override to true, setting the override to false, and leaving it unset, respectively).
  • When not building in Xcode, an attempt is made to determine whether output is to a terminal that can support escape codes and they are suppressed if the answer is no.
  • Fixed some misaligned whitespace in --help's output.
  • An EOF on stdin (such as by pressing Ctrl-D) no longer causes Console.choose() and Console.confirm() to go into an infinite loop of printing the prompt over and over.