# HG changeset patch # User edogawaconan # Date 1404883763 -32400 # Node ID 51a60cc44880bacae0bb7da9b2705954d9ac0d99 # Parent b88f621b6bd899ca6c4c0d7c75464ef754b5c450 Add hggrep to grep hg repo. diff -r b88f621b6bd8 -r 51a60cc44880 rc/bashrc --- a/rc/bashrc Tue Jul 08 23:56:18 2014 +0900 +++ b/rc/bashrc Wed Jul 09 14:29:23 2014 +0900 @@ -177,6 +177,12 @@ alias egrep="grep -E" fi +# FIXME: missing test for hg and xargs -0 +_xargs_grep="${_grep}" +[ "${_has_gnu_grep}" = y ] && _xargs_grep="${_grep} --color=always" +alias hggrep="hg locate -0 | xargs -0 ${_xargs_grep}" +unset _xargs_grep + unset _has_gnu_ls unset _has_gnu_grep unset _has_posix_grep