I have the following line in my .zshrc
:
export PROMPT="%n@%K{9}%m%k:%~# "
It works if I connect directly
But doesn't work inside tmux
How to fix?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityAddition of
set-option -g default-terminal "tmux-256color"
to ~/.tmux.conf
helped.
tmux
configured to start zsh as a login shell, or as a non-login shell? That affects whether it sources .zshrc or .zprofile I think?TERM=tmux tput colors
indicates that that terminal emulator only supports 8 colours on my system. I havetmux-256color
terminfo entry so maybe tmux can be configured to support 256 colours (assuming its host terminal(s) can too) and then you'd need to make sure$TERM
is set to that value iftmux
doesn't do it already.