From 8a740c6d441afd980e3bdb43d1844bd23e0ad55b Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Fri, 5 Aug 2016 17:48:53 +0200 Subject: Additional test for color output. Color output is only enabled if stderr is a tty, and the environment variable TERM is not empty or dumb. Bug 18004 --- driver/Commandline.ml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'driver/Commandline.ml') diff --git a/driver/Commandline.ml b/driver/Commandline.ml index 0a2c8fca..c5c2b82c 100644 --- a/driver/Commandline.ml +++ b/driver/Commandline.ml @@ -31,6 +31,8 @@ type action = | Self of (string -> unit) | String of (string -> unit) | Integer of (int -> unit) + | Ignore + | Unit of (unit -> unit) let match_pattern text = function | Exact s -> @@ -95,6 +97,8 @@ let parse_array spec argv first last = end else begin eprintf "Option `%s' expects an argument\n" s; exit 2 end + | Some (Ignore) -> parse (i+1) + | Some (Unit f) -> f (); parse (i+1) end in parse first -- cgit