I have a colorized prompt set up in my
export PS1="\[\033[0:33m\]testprompt@\h\[\033[00m\] "
Outside of tmux I get a colored prompt reading
Inside a tmux session, the text is set but the prompt is not colorized. Other programs output color normally.
I've set a color terminal in
set -g default-terminal "xterm-256color"
I'm using the default terminal on macOS. Bash and tmux are the latest versions from the homebrew package manager. The same version of bash running inside tmux and outside.
The following environment variables are exactly the same inside and outside of tmux:
$ echo $PS1 \[\033[0:33m\]testprompt@\h\[\033[00m\]` $ echo $TERM xterm-256color $ echo $SHELL /usr/local/bin/bash $ echo $BASH_VERSION 4.4.23(1)-release
Color works perfectly for other commands inside tmux, like
ls -la and
git log. The
fish shell has a color prompt inside tmux. Opening a new
bash instance again within tmux doesn't make any difference - still no color.
.bash_profile is being read and
$PS1 is being set. The prompt colors work in screen and in "raw" bash outside of tmux, just not in tmux. What am I missing?