Below is my zsh prompt configuration. Within Emacs (eterm) and Intellij terminals the display is compromised. Below is a representation of the display.

%                                             |                                                                                                                                            
ari@machine:~% →   [16:38:14]

The issues are:

  1. The existence of a percentage symbol indicating non-privileged shell on the top line
  2. The cursor (notice the vertical bar) is located above the configured left and right prompts, and far to the right of the screen
  3. The left and right prompts are located next to each other, rather than at opposite ends of the screen

Does anyone see any issues with the either of the prompt configurations?

precmd() {

zstyle ':vcs_info:git*' formats '%b'



scm_branch() {
  if [ -n "${vcs_info_msg_0_}" ]; then
    echo -e "${BRANCH_MARK} ${vcs_info_msg_0_}"

PROMPT='%n@%m:%{$fg[cyan]%}%~%{$reset_color%}%# ${STATUS} %{$reset_color%}'
RPROMPT='$(scm_branch) [%*]'
  • It's a little unreasonable to ask people to explain a visible effect with only a vague and cursory mention of what the visible effect is. You really should edit the question to show potential answerers what spaces, how many spaces, and exactly where they are occurring. You haven't even told people enough to determine which of those two prompts to look at, and that's basic minimal information about which side of the screen this is happening on. – JdeBP Feb 6 at 20:02
  • I would suspect those unicode characters are running afoul of something, but don't use a prompt so fancy. Maybe look at the MULTIBYTE option or the %G prompt escape? – thrig Feb 6 at 22:08
  • @JdeBP The posted configuration was my first attempt at configuring a zsh prompt, therefore thought the issue would be the result of an obvious syntactical oversight - hence the limited contextual information. In any event, while attempting to debug the issue, determined the cause is the RPROMPT. I've accordingly updated post. Thanks. – Ari Feb 7 at 1:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.