Skip to content

Commit

Permalink
Yes, tput colors doesn't seem to give $TERM
Browse files Browse the repository at this point in the history
Revert "exit if terminal doesn't support 256 colors"

This reverts commit 2c6b50b.
  • Loading branch information
karthik committed Sep 23, 2013
1 parent f64497f commit 9577400
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions git-cal
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/perl
use strict;
use warnings;

use utf8;
use Getopt::Long;
Expand Down Expand Up @@ -37,14 +38,6 @@ my ( $cur_start, $max_start, $max_end, $cur_weekdays_start, $max_weekdays_start,
#loads of global variables

sub process {
#try to exit gracefully when the terminal doesn't support enough colors
no warnings; #dont warn if tput command fails
my $colors_supported = qx/tput colors/;
if ($colors_supported && $colors_supported < 256) {
chomp $colors_supported;
print "fatal: 'tput colors' returned < 256 (" . $colors_supported . ") , cannot plot the calendar as the terminal doesn't support enough colors\n"; #will try to hack around this soon
exit(1);
}
init_cal_stuff();
my $extra_args = "";
$extra_args = " --author=" . $author if $author;
Expand Down

0 comments on commit 9577400

Please sign in to comment.