k4rthik / git-cal

github like contributions calendar on terminal
MIT License
1.11k stars 61 forks source link

Bad detection of $TERM #14

Closed lyrixx closed 11 years ago

lyrixx commented 11 years ago

I had to use this hack to use git-cal:

diff --git a/git-cal b/git-cal
index 48e827b..29fb58a 100755
--- a/git-cal
+++ b/git-cal
@@ -42,8 +42,8 @@ sub process {
     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
-      exit(1);
+      # print "fatal: 'tput colors' returned < 256 (" . $colors_supported . ") , cannot plot the calendar as the terminal doesn't support enough colo
+      # exit(1);
     }
     init_cal_stuff();
     my $extra_args = "";

As you can see on mys screenshot, everything is ok screenshot

Leonidas-from-XIV commented 11 years ago

Yep, neither gnome-terminal nor Konsole advertise their support for 265 colors in $TERM. It also works if you export TERM=xterm-256color which makes this check somewhat pointless.

k4rthik commented 11 years ago

reverted