sharkdp / vivid

A themeable LS_COLORS generator with a rich filetype datebase

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

colors odd in readline completion menu when colored-stats set

jdsutherland opened this issue · comments

For readline, if you set the following (in inputrc):

set colored-completion-prefix on
set colored-stats on

Here are the colors (left jellybeans, right nord):
image

The colors for readline completion look odd relative to how colors tend to look elsewhere. nord would probably look fine with a nord terminal theme (matching background), but the jellybeans background is pretty jarring. I don't know anything about the details of how LS_COLORS are defined so I'm not sure if the vivid definition could be improved or if readline is using the LS_COLORS in a strange way.

Looking at the vivid definitions, it looks like these readline colors correspond to either
broken_symlink or missing_symlink_target.

On second thought, this might be esoteric enough to not worry about. I discovered inputrc config for readline the other day and tried set colored-stats on, not really knowing what to expect and found the colors looked wonky in the completion menu. I'm not sure what other contexts that option effects other than the completion menu, but I think it looks better to just leave it off whereset colored-completion-prefix on looks fine.

I guess another solution would be to implement my preferred colorscheme (base16-tomorrow-night) in vivid. Maybe I'll do that at some point.

To be honest, I'm not really familiar with this readline/inputrc feature. And I'm surprised it looks at LS_COLORS at all. To be honest, it sounds like an upstream bug and not something that can be fixed in vivid. But I might be wrong...

Yeah, now that I understand this better since I originally created the issue, I don't think it makes sense to call this a bug. It's just that however readline is using LS_COLORS, the colored-completion-prefix option seems correspond to the vivid definition of broken_symlink. I happen to think that it looks bad for certain themes, but I don't think vivid should make any changes based on this. If one doesn't like the color, they can always tweak the vivid definition.