@tnt : that’s quite error prone (need to check the path).
I managed to do it by checking for "x" in the binary stream b'x' with the color option. If it fails, fallback to grep without color. (the challenge was to ensure that the grep test would succeed)