dotfiles

Personal dotfiles
git clone https://git.bracken.jp/dotfiles.git
Log | Files | Refs | LICENSE

commit 26343512cb844eb5db984dce31008f719469fa98
parent d5ca05e686be87348e19a6ae29125aab286ab6ba
Author: Chris Bracken <chris@bracken.jp>
Date:   Fri,  7 Aug 2015 11:53:17 -0700

Ensure TERM=xterm-256color under gnome-terminal.

As of version 3.12.0, gnome-terminal no longer sets COLORTERM.

Diffstat:
M.bashrc | 3++-
M.zshrc | 4+++-
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/.bashrc b/.bashrc @@ -60,7 +60,8 @@ else fi unset color_prompt force_color_prompt -if [ "$COLORTERM" = "gnome-terminal" ]; then +if [ "$COLORTERM" = "gnome-terminal" ] || \ + [ "$(tput colors 2>/dev/null || echo 0)" = "256" ]; then export TERM=xterm-256color fi diff --git a/.zshrc b/.zshrc @@ -51,7 +51,9 @@ else fi unset color_prompt force_color_prompt -if [ "$COLORTERM" = "gnome-terminal" -o "$TERM_PROGRAM" = "iTerm.app" ]; then +if [[ "$COLORTERM" = "gnome-terminal" ]] || \ + [[ ${$(</proc/$PPID/cmdline):t} == gnome-terminal* ]] || \ + [[ "$TERM_PROGRAM" = "iTerm.app" ]]; then export TERM=xterm-256color fi