Solved gdircolors (Coreutils) not working correctly

Greetings,

I'm running 13.4-RELEASE-p1.

I'm trying to use 'sysutils/coreutils' for colorized ls since gnuls is no longer an option.
Using the Coreutils manual as a guide...

GNU Coreutils manual (Section 10.4 dircolors):

When I try to evaluate my .gdir_colors file I get an error saying "dircolors" command not found...

[carltonfsck@ssh ~]$ eval "$(dircolors -b ~/.gdir_colors)"
-bash: dircolors: command not found
[carltonfsck@ssh ~]$

If I place the following in my .bash_profile and source the file, I get the same error...

d=.gdir_colors
test -r $d && eval "$(dircolors $d)"

[carltonfsck@ssh ~]$ source .bash_profile
-bash: dircolors: command not found
[carltonfsck@ssh ~]$

In this case, the dircolors command doesn't exist. So, I used the 'gdircolors' command instead to invoke it (found this in my research). It works, but now it doesn't display two of the filetype's colors correctly.
I want any compressed file to show in WHITE (01;37) and jpg/jpeg files to show in MAGENTA (01;35), but they're both showing in GREEN. I've attached my .gdir_colors file for reference.

What am I missing?? Any ideas? This has been driving me nuts to no avail as I can't seem to figure it out. I thought a fresh pair of eyes might help.

And as always, thank YOU in advance to the FreeBSD community for any assistance.

--Cf
 
Perhaps I'm not going to be helpful here, but the default FreeBSD ls command (/bin/ls) seems to work perfectly well the the LS_COLORS variable..... not sure why you need to use gnu coreutils for this. Also, the eza alternative is available via pkg and ports and it also colorizes output based on LS_COLORS if so desired.

You can get a pre-defined LS_COLORS (that you can customized) from https://github.com/trapd00r/LS_COLORS
 
Are the files executable? If I change a .jpg to 755 for example, it changes to green. 644 changes it back to magenta.
Negative. They're both set to 644. However, I went ahead and changed them to 755 (making them executable) just to see what would happen and now they're Magenta, but executable. WEIRD.
 
Perhaps I'm not going to be helpful here, but the default FreeBSD ls command (/bin/ls) seems to work perfectly well the the LS_COLORS variable..... not sure why you need to use gnu coreutils for this. Also, the eza alternative is available via pkg and ports and it also colorizes output based on LS_COLORS if so desired.

You can get a pre-defined LS_COLORS (that you can customized) from https://github.com/trapd00r/LS_COLORS
coreutils was mentioned as an alternative after portupgrade started alerting that the gnuls port had been deleted. So, I went with that port.
Eza seems rather nice with a lot options. I also found a nice page that someone created highlighting all the features. I'll have to check this out. Thanks for this!
 
Well, looks like I'll be sticking with 'eza' which is downright amazing! Thanks to Lowkeyloki for this! And thanks to everyone else who chimed in!
 
Back
Top