We could learn $PROMPT (or $PS1 ).
Indeed, the oh-my-zsh agnoster theme uses PROMPT_SUBST for her. Thus, we can get the original escape sequences with a redirect or print -P output pipeline:
$ print $PROMPT %{%f%b%k%}$(build_prompt) $ print -P $PROMPT | cat -v ;# or redirect to a file as you like ^[[39m^[[0m^[[49m^[[40m^[[39m me@mycomputer ^[[44m^[[30mM-nM-^BM-0^[[30m ~ ^[[49m^[[34mM-nM-^BM-0^[[39m
These are the original escape sequences; ANSI escape codes are well described at https://en.wikipedia.org/wiki/ANSI_escape_code#Colors . These are CSI codes CSI CSI nm SGR - a choice of graphic rendering.
Try to describe the above output:
( ^[[39m : the first two characters are escaped by cat -v . We have ESC[39m .)
^[[39m^[[0m^[[49m : from %{%f%k%b%} of the print $PROMPT output part. ^[[39m to reset the foreground background color, ^[[0m reset each effect and [[49m to reset the default background color.^[[40m^[[39m me@mycomputer : black color bg and color fg^[[44m^[[30m M-nM-^BM-0 : default color is bg blue and fg ( M-nM-^BM-0 is cat -v escaped form ξ°)
At this point, it seems that the invitation displays bg blue code for pwd. You can check with print -P '%b%F{red}co%F{green}lo%F{blue}rs%f%b' (Note: first "% b")
This means that the powershell color palette setting does not match ANSI escape sequences. We could check if the terminal color 16colors.sh setting is correct or not 16colors.sh in xterm if we have sh viewing the output of sh ./16colors.sh . (For example, an example of the default output xterm can be found, for example: https://www.in-ulm.de/~mascheck/various/xterm/16-table.html )
Your PowerShell Solarized (?) Theme seems to display the ansi blue color sequence ( ^[[44m or ^[[34m ) as a grayish for our eyes.
hchbaw
source share