daveewart / colordiff

Primary development for colordiff
http://www.colordiff.org/
GNU General Public License v2.0
177 stars 37 forks source link

colordiff -y not outputting color on CentOS7 #47

Closed Ajhad1 closed 4 years ago

Ajhad1 commented 4 years ago

I recently posted here of what I thought was user error while using colordiff but after some troubleshooting, I believe that it may be a bug. Below is a copy of my issue. Looking for some help, please.

For the life of me, I cannot get colordiff to output color to the terminal. I feel like I am missing something simple.

Example of no color output

Environment:

The specific command I am trying:

Commands I have tried but will not output color:

Commands that will output color in the terminal for all files:

Commands that output color depending on the type of "diffs" in the files:

Note: I have preceded most commands with a \ to make sure no aliases are involved.

Update: After trying multiple files for comparison, it turns out that the original files I was comparing had a trailing space that was causing an issue. That said, the issue still requires that I add --suppress-common-lines to my original command, even though in my case, that only removes 2 lines from the output.

Only working edge case for -y --left-column

daveewart commented 4 years ago

If you are really using colordiff 1.0.13 then that’s ancient. Try with most recent version. In particular, version 1.0.14 (released 2015) introduced a lot of extra support for side-by-side diffs.

Ajhad1 commented 4 years ago

Thank you for responding.

CentOS 7 EPEL only has version 1.0.13 but I have submitted a bug report to update the release to at least 1.0.14 here https://bugzilla.redhat.com/show_bug.cgi?id=1868695

I am not sure about their process but I have linked that report to this one so they can see your comment.

daveewart commented 4 years ago

CentOS 7 is a current supported release, it really should have a more recent version than 1.0.13 which was released in 2012! I’m assuming that’s all it has because when CentOS 7.0 was released in 2014 that was the current version: perhaps no-one is maintaining the package there any more? There have been a number of releases since then, see https://www.colordiff.org/archive/

Anyway a new version will solve your issue, so I’ll close this one. Good luck :-)

Ajhad1 commented 4 years ago

The version included in CentOS 7 EPEL has been updated to colordiff 1.0.19 https://bugzilla.redhat.com/show_bug.cgi?id=1868695#c14

Thank you for responding.

richardfearn commented 4 years ago

Also updated in EPEL 6: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-f86c8b7635

alexcanepa commented 3 years ago

I get the same issue with colordiff 1.0.19 on both Ubuntu and MacOS, where the output is identical to that of diff

daveewart commented 3 years ago

I get the same issue with colordiff 1.0.19 on both Ubuntu and MacOS, where the output is identical to that of diff

Hi @alexcanepa - this is an old issue which has been closed. You haven't provided much detail of the problem you are seeing, please could you open a new issue with as much detail as possible about your setup and I'll take a look?