ITerm2 RTL Support
Since I moved to macOS in 2020, I have been using iTerm2 as my terminal emulator. It is a great terminal emulator with many features and customization options. But being the best terminal emulator doesn't mean that it does support RTL. This is actually true for all other terminal emulators on macOS. This is annoying for me someone who sometimes write Arabic in terminal. For many reasons. On my mini PC running Linux in my CERN office I can use many of the terminal emulators that support RTL.
But I never found anyone that supports RTL on macOS. Until now. iTerm2 3.6.0 added an experimental support for RTL text. It is not perfect, but it is a good start. You can enable it by going to Settings > General > Experimental and checking the Enable support for right-to-left scripts option.
Just to feel how it looks like, here is a terminal record of iTerm2 with Arabic text:
Although it has the common issue with RTL text when you have mixed LTR and RTL text, it is still good start. Also, I would like to play with different fonts to see how they behave with RTL text. My fonts are tailored for my usual use cases, so I need to find the right font that works well with RTL text.
Funny enough, I had something in my terminal settings somewhere producing a bug that I couldn't produce again. It is that when I type my Arabic name "محمد" that it will get hidden in both the echo and the prompt. I was playing with my ~/.zshrc and configurations, so I might have fixed it without knowing. But I couldn't reproduce it again to see what was causing it. If I find it again, I will update this post. It would be actually also weird if this was an issue at all. Because I wouldn't expect my name to cause any issues. I use omz and powerlevel10k and was playing with their configurations. Actually me updating my dotfiles is what made me remember that I saw that ITerm2 added RTL support recently noticing that when I was updating ITerm2 and read the release notes.