First of all, there is a significant difference between the terminals types rxvt and unicode-rxvt (often abbreviated to urxvt). You have indicated that the terminal you are using is "URXVT Version 9.22", so to avoid confusion, please use the correct name which is not rxvt but urxvt.
As Mikel has pointed out, the Xresources file is telling urxvt to use the 9x15 font which is (a) the old style X11 server provided font method and (b) a limited capability bitmap font.
The oh-my-zsh Github README file explains
many themes require installing the Powerline Fonts in order to render properly
So in order to show the correct arrow shape you need to have the terminal using the appropriate font. Perhaps your update which broke the feature was an update which reset the font usage by urxvt?
As you state that sterminal displays the prompt correctly, check which font that is using, then change the .Xresources in your ${HOME} directory to use that font after verifying that it works with the manual test urxvt -font "font_name". (For the newer method of Xft supplied fonts, font_name is preceeded by "xft:" and followed by ":size=12" for font size).
Having checked in my urxvt, it seems quite a number of well known truetype and opentype monospace fonts do not provide the "right arrow" glyph and just show an empty box. However one readily available standard font that does work (and should be installed on your system) is Deja Vu Sans Mono.
So try firing up a urxvt with
urxvt -font "xft:Deja Vu Sans Mono:size=12" &
and see if your prompt is correctly displayed.
Take a look at https://bbs.archlinux.org/viewtopic.php?id=173477 for discussion on modifying font resource specification for urxvt in an Xresources/Xdefaults file.
PS Do not forget that you can use multiple urxvt terminals more efficiently if you first start the urxvtd daemon and then fire up terminals with urxvtc.
ADDENDUM
Thanks for confirming that you are using urxvt and you have DejaVu Sans Mono installed.
Confirm that there is no font substitution happening with the command entered in terminal at the prompt
fc-match "DejaVu Sans Mono"
producing the output
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
The actual font file location and styles available for the font can be verified with
fc-list | grep --color 'DejaVu Sans Mono'
Now assuming that is all okay, you need to check by firing up a urxvt from the command line of a terminal (sorry for not making that absolutely clear above and I had space between Deja and Vu which might have caused a problem)
urxvt -font "xft:DejaVu Sans Mono:size=12" &
that you can cut'n'paste the right-arrow character (from here) "➜" into that urxvt and that it displays correctly which I have checked does work.
I can also confirm that putting the following into an Xresources file
URxvt.font: xft:DejaVu Sans Mono:autohint=true:size=12
URxvt.boldFont: xft:DejaVu Sans Mono:autohint=true:bold:size=12
URxvt.italicFont: xft:DejaVu Sans Mono:autohint=true:italic:size=12
URxvt.boldItalicFont: xft:DejaVu Sans Mono:autohint=true:bold:italic:size=12
and loading into the Xorg server resource database with xrdb -merge Xresource_file_name to be 100% certain those values will be used and then firing up a terminal with just urxvt at the command line results in a terminal in which the font correctly shows the right arrow character. (you should also notice that characteristic of this font, the l characters are curly and that there is a dot in the center of the zero characters).
The font I normally use in urxvt "Luxi Mono" (easier to read, easy on the eyes IMHO) does not display the right arrow correctly even though the "font-manager" program reveals that "Luxi Mono" does have the glyph. Similarly xterm is also broken but a test in lxterminal, mate-terminal, and xfce4-terminal (checked in preferences that font is set to Luxi Mono) all display the right-arrow correctly. So it does appear that something is broken for some fonts in urxvt and xterm (which if I understand correctly share some code origins) just as the others which work similarly share some common code viz libvte.
Best Answer
Since no one else has given you an answer, I'm trying despite having completely different software. So this is a generic answer on how to do it with any software. There are two approaches that come to mind:
1. Different environments
Open Terminal, and run
env > env.terminal
. Open Android Studio, and runenv > env.studio
. Now, in either terminal, you can rundiff -dby --suppress-common-lines env.terminal env.studio
(if Mac OS X diff has those options; if not-U1
works well enough).As an example, here is the difference between
xterm
andkonsole
on my Linux box (note: spacing modified to fit on the page):Some of that stuff is clearly noise from how I launched the two different terminals. But others are not. If I wanted something only in XTerm, then
if [ -n "$XTERM_VERSION" ]
would seem to be a pretty good way to do that. Similarly, for Konsole,$KONSOLE_PROFILE_NAME
would be a good one (and probably a few of the others, too).2. Different parent processes
A shell knows its own process ID, it can be accessed via
$$
. POSIX also has$PPID
to get the parent PID directly, so I suspect you have that in zsh too. If not,ps
can get it for you:ppid=$(ps -o ppid= $$)
. You can then get the command run, also with ps:(You can try
-o comm=
as well).In a shell script, it'd look something like:
If you need to go further up the process tree, you can use
ps
to get the parent's parent, etc.