bashrc doesn't consider *-256color TERMs to be color

Bug #1210995 reported by Spike Grobstein
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When opening up a login session on an Ubuntu server, if the terminal is 256 color, the bashrc does not consider it to have color support, and the prompt is not colorized.

Examples of this are when `TERM` is set to `xterm-256color` or `screen-256color` (as when connecting from a `tmux` session).

Typically, I modify the bashrc so the color prompt section looks like the following:

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
    xterm-color) color_prompt=yes;;
    *-256color) color_prompt=yes;;
esac

This has affected me since I've been using any 256color terminal emulator in every version of ubuntu since 10.04.

So, in summary, when I ssh to a machine with TERM=xterm-256color, I expect my prompt to be green, but it shows up as the default terminal color. changing TERM to xterm-color fixes this, but I don't get full-color vim.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bash (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.