Comment 3 for bug 1330173

Revision history for this message
Peter Cordes (peter-cordes) wrote :

Good catch, but the right fix is to use command grep, like most of the uses of grep in bash-completion do. --color=never isn't portable to systems where grep isn't GNU grep. So yes, this is a bug, and bash-completion is supposed to not break even if you have
alias grep='cat /dev/random'

 But yes, --color=auto usually works better. If you ever make one-liners on the cmdline, you're shooting yourself in the foot unless you like remembering to type command grep, or \grep. Like less $(ls foo/bar | grep something).

 On the other hand, less -R can handle color escape codes these days, and even matches searches in coloured text. Hmm, that's pretty nice actually.