ompi icon indicating copy to clipboard operation
ompi copied to clipboard

[FR] Color coding for ompi_info

Open gkatev opened this issue 3 years ago • 4 comments

Hello, I'd like to throw in a low-importance quality-of-life improvement: add colors to the output of ompi_info. I'm mostly thinking of this for MCA parameters, to help navigate long outputs.

I've prototyped an example of what something like this might look like:

tuned_both

gkatev avatar Sep 19 '22 11:09 gkatev

Nice. One suggestion: enable colors only when the terminal has ANSI capabilities and we are not dumping the MCA as parsable.

bosilca avatar Sep 19 '22 13:09 bosilca

That is super awesome - I love it! 🎉 Can you make a PR?

I do echo @bosilca's suggestion, though -- only use colors if it's a TTY (e.g., if you pipe the output of ompi_info through less or more or something, we don't want ANSI sequences in there.

jsquyres avatar Sep 19 '22 14:09 jsquyres

Perfect! Yea, I will look around and see where to implement it.

gkatev avatar Sep 20 '22 07:09 gkatev

I created #10820 (draft), and will gradually update it in the next days.

gkatev avatar Sep 20 '22 14:09 gkatev