builtin/grep.c: make configuration callback more reusable