So, I had just made the move to Mongo 5.0.23 from 4.4, which also means we’ve made the move to from mongo to mongosh.
Now, the people who I am supporting are not big fans of the syntax colorization that Mongo Shell uses since some of the font is a lot harder to read (yellow text on white background) and requested that I make it monochrome.
I’ve been able to get it to remove most colors by setting the environment variable NO_COLOR to 1. However, it doesn’t seem that Mongo shell is fully honoring this variable; Things such as deprecation messages, error messages or pretty much anything between quotes gets colorized.
I’ve attempted to set my term to both “dumb” and “xterm-mono” and the output still comes out colorized on Mongo (even if it’s colorized on no other program).
I’ve searched all over for any other person with this same problem and had only found a reddit post with the NO_COLOR suggestion. I couldn’t find anything in Mongo’s documentation, either.
I’m at my wit’s end here. Does anyone happen to know of a way to turn this off?
I’m using Debian 11 and am using bash shell, if that helps. I apologize if I omitted any important details.
@Peahat you raise an interesting question!
Mongosh’s AI doc search bot insists there is no way to do this.
However, this may be an accessibility issue as color-blind persons might have great difficulty, not merely annoyance, with colorized responses.
Perhaps you could go to the MongoDB Issue Tracker and open an Accessibility issue.