Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
72
rated 0 times [  72] [ 0]  / answers: 1 / hits: 30526  / 2 Years ago, thu, september 8, 2022, 10:35:07

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%}'

More From » prompt

 Answers
1

Starting tmux with u flag solves this issue



tmux -u


I've created an alias of tmux in my zshrc



alias tmux='tmux -u'

[#27306] Saturday, September 10, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
raacket

Total Points: 198
Total Questions: 114
Total Answers: 111

Location: Czech Republic
Member since Mon, May 15, 2023
1 Year ago
raacket questions
;