From 85808cfafda2e74a99654d9a940291563b13cd85 Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Tue, 25 Nov 2008 15:40:00 +0000 Subject: [PATCH] Set grep 2.5.3 colours. git-svn-id: https://svn.cambridge.iain.cx/profile/trunk@155 6be0d1a5-5cfe-0310-89b6-964be062b18b --- .profile.d/variables.bashrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.profile.d/variables.bashrc b/.profile.d/variables.bashrc index 3182c19..3298c76 100644 --- a/.profile.d/variables.bashrc +++ b/.profile.d/variables.bashrc @@ -18,5 +18,15 @@ export SSHTERM="urxvt" export SSHTERM_TITLE="-title" export SSHTERM_EXEC="-e" export GREP_COLOR='0;33' +# cx: Lines of context; sl: Matching lines; mt: Search string; fn: Filename +# ln: Line number; bn: Byte offset; se: Separators. +colours=$(tput colors) +if [ $colours = 256 ]; then + export GREP_COLORS='cx=38;5;246:sl=:mt=33:fn=38;5;25:ln=38;5;82:bn=33:se=38;5;246' +elif [ $colours -gt 88 ]; then + export GREP_COLORS='cx=38;5;84:sl=:mt=33:fn=38;5;22:ln=38;5;44:bn=33:se=38;5;84' +else + export GREP_COLORS='cx=31:sl=:mt=33:fn=36:ln=34:bn=33:se=31' +fi export SCREENDIR="$HOME/.screen/$HOSTNAME" #mkdir -p "$SCREENDIR" -- 2.20.1