From 9bf59a0e342e41fb32ef17462a7e0b09a5690c9a Mon Sep 17 00:00:00 2001 From: Gea-Suan Lin Date: Wed, 5 Nov 2014 01:57:57 +0800 Subject: [PATCH] Hack for gnome-terminal. --- .bashrc | 6 ++++-- .zshrc | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.bashrc b/.bashrc index f47ec6b..9338ff6 100644 --- a/.bashrc +++ b/.bashrc @@ -62,15 +62,17 @@ shopt -s histappend # if [ "`uname -s`" == "FreeBSD" -o "`uname -s`" == "Darwin" ]; then alias ls="/bin/ls -aFG" - alias tmux="TERM=xterm-256color /usr/local/bin/tmux" alias w="/usr/bin/w -i" elif [ "`uname -s`" == "Linux" ]; then alias ls="/bin/ls -aF --color=always" - alias tmux="TERM=screen-256color /usr/bin/tmux" else alias ls="/bin/ls -aF" fi # +if [ "$COLORTERM" == "gnome-terminal" ]; then + export TERM=xterm-256color +fi +# [[ -s "/etc/bash_completion" ]] && source "/etc/bash_completion" [[ -s "/usr/local/share/bash-completion/bash_completion" ]] && source "/usr/local/share/bash-completion/bash_completion" [[ -s "/usr/local/share/git-core/contrib/completion/git-completion.bash" ]] && source "/usr/local/share/git-core/contrib/completion/git-completion.bash" diff --git a/.zshrc b/.zshrc index a2eac42..a43126d 100644 --- a/.zshrc +++ b/.zshrc @@ -88,6 +88,10 @@ else alias "ls=/bin/ls -aF" fi # +if [[ "$COLORTERM" == "gnome-terminal" ]]; then + export TERM=xterm-256color +fi +# export BLOCKSIZE="k" export EDITOR="vim" export GIT_PAGER="less"