Question

i know you can set grep color defaults using the environment variables $GREP_OPTIONS and $GREP_COLOR, but i can't seem to find any way to set the default color options with pcregrep...

i have export GREP_OPTIONS='--color=auto' and export GREP_COLOR='31' in my /etc/profile right now, and want to have equivalent defaults for pcregrep.

tldr: how do i make pcregrep color matches by default?

Was it helpful?

Solution

i never did figure out how to do exactly what i wanted, but i got the same end result using an alias:

alias pcregrep='pcregrep --color=auto'

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top