shorthand -C to disable color
authorMischa POSLAWSKY <perl@shiar.org>
Fri, 6 Sep 2019 22:18:29 +0000 (00:18 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Sat, 7 Sep 2019 00:07:24 +0000 (02:07 +0200)
There is precedent for capitalisation to negate, along with +c which is not
supported by Getopt::Long.

graph

diff --git a/graph b/graph
index 41d858a0bdbbf52159f3dc06797ed24f13d4d2cf..814486885f5245974c44a5f58c4cc9e93b8f5ded 100755 (executable)
--- a/graph
+++ b/graph
@@ -16,6 +16,7 @@ sub podexit {
 my %opt;
 GetOptions(\%opt,
        'color|c!',
+       'C' => sub { $opt{color} = 0 },
        'interval|t:i',
        'trim|length|l=s' => sub {
                my ($optname, $optval) = @_;