From 18f2d67e1bf8e4b866ccad28b22fb64c73b431e9 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 19 Dec 2012 17:27:23 +0900 Subject: [PATCH] test with grep -o not works as expected, use usual null redirect --- bashrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bashrc b/bashrc index 041743d..3c46032 100755 --- a/bashrc +++ b/bashrc @@ -54,7 +54,8 @@ export VISUAL="$EDITOR" export GIT_PAGER="less -F" export GIT_EDITOR="$EDITOR" if test -n "$TMUX" && \ - test -n "tmux display -p '#{client_termname}' | grep -o 256color" + echo $TERM | grep screen >/dev/null 2>&1 && \ + tmux display -p '#{client_termname}' | grep 256color >/dev/null 2>&1 then TERM=screen-256color fi