X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/15b95c263f73e6a7db97de5b5597f272ea1bff77..95b55b7105c750e63ff9643d7ed60be00cd75e72:/bashrc diff --git a/bashrc b/bashrc index 6759da7..7f4cd74 100644 --- a/bashrc +++ b/bashrc @@ -112,6 +112,22 @@ ls () { fi } +# --- Some colour `grep' support --- + +export GREP_COLORS="mt=01;31:ms=01;31:mc=031;31:fn=36:ln=36:bn=36:se=34" + +greplike () { + declare grep=$1; shift + if [ -t 1 ]; then + command $grep ${GREP_COLORS+--color=auto} "$@" + else + command $grep "$@" + fi +} +alias grep="greplike grep" +alias egrep="greplike egrep" +alias fgrep="greplike fgrep" + # --- Set up some simple aliases --- alias cx='chmod a+x'