Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use character in my zsh theme's for prompt. But in tmux, my prompt was behaving weirdly, showing extra spaces, like this:

♪ ~   I can type from here
♪ ~ Instead of here like in zsh, and sometimes when I do stuff like cd
♪ ~   cd ~
♪ ~ cdcd /
♪ ~ ^^These 2 chars just show up but are not actually part of command and not delete-able

I recently discovered that I can set tmux encoding to utf8 by set-window-option -g utf8 on. Doing that, the space problem was gone but character changed to _. How can I get my back in tmux?

My zsh-theme:

PROMPT='%{$fg_bold[cyan]%} ♪ %{$fg[blue]%}%c%{$fg_bold[blue]%}$(git_prompt_info)$(git_remote_status)%{$fg_bold[blue]%} % %{$reset_color%}'
share|improve this question
I couldn't get set-window-option to work for me not found cmd. Please, could write exact steps to reproduce it. – Sneetsher Jan 25 '14 at 12:08
I used the tmux conf here (its also used here). It looks like tmux is converting every character that is not ASCII into _, when I set that option. – Sourabh Jan 25 '14 at 18:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.