Skip to content

Color problems #2441

@TomasPuverle

Description

@TomasPuverle

I just spent some time stepping through the code trying to debug something which turned out to be a phantom issue.

I use a "Dark Solarized" color scheme in my terminals, and when running

spack find --long

I could only see the packages but none of the hashes. As you've probably guessed by now, the color of the output was so similar to the terminal background that it was not visible.

I can imagine that colors are not a priority right now, so I'm filing the issue more as a reminder, but it would be nice if in the future, at least the color map in tty/color.py could be adjusted based on the terminal, or perhaps configurable.

In the meantime, an additional solution might be to just have a --nocolor option. It appears from the code that this would, in fact, be quite simple to do. In some places, the "color" keyword args seems hard-coded, but I think this could just be handled in tty/color.py. As a second benefit, it would allow to dump the output to a file; at the moment, it seems that irrespective of whether the output is a tty or not, the output is colorized (my guess is that this is because of the desire to use |less -R).

Thanks,

Tom

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions