1

I am running Mac Catalina 10.15.6 and have XQuartz 1.18.4 installed. After running any successful command on XQuartz the follow characters are written to the terminal: 64;1;2;6;9;15;18;21;22c. I also have a custom prompt in my .zshrc file that reads:

export PROMPT='%(?.%F{green}√.%F{red}X)%f %B%F{240}%1~%f%b %# '

This just shows a green check when a command is successful and red x when a command fails. When this is removed the characters do not show in XQuartz. Thus, my question is: how can I preserve the functionality for my regular zsh shell and not have the characters show when running XQuartz?

nate
  • 111
  • 2

1 Answers1

1

A dirty solution is to put something like the following in your .zshrc file:

if [ "$TERM" = "xterm" ] ; then
    PROMPT='%2~$ '
else
    PROMPT='%(?.%F{green}√.%F{red}?%?)%F{blue}%2~$ '
fi

since xquartz reports xterm and Apple Terminal reports xterm-256color.