p-ranav / fccf

fccf: A command-line tool that quickly searches through C/C++ source code in a directory based on a search string and prints relevant code snippets that match the query.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flag to turn off / customize colors

pfirsich opened this issue · comments

Unfortunately the color fccf uses to print filenames is the same as my terminal background color, making the lines invisible. It would be nice, if there was a switch to turn off the colored output (like when stdout is not a tty), so you can add it in an alias.

Ultimately it would be great, if it was possible to customize the colors. I do realize that might be quite a task (as you need a way to get the colors into the program), but considering fccf does colors code quite extensively I think it does make sense that eventually such a feature would exist.

I've added a --no-color option to turn off coloring.

You can also pipe to another program (like bat) to color the output.

Yes, I'll add in flags to support configurating the color for each element in the output; makes sense.

Thanks! Also for the great tip to re-color with bat.