Skip to content

BiDi / RTL Text

Otty renders Hebrew, Arabic, and mixed right-to-left text in the order people read it. The terminal grid still stores text in logical order, so copy, paste, find, shell editing, and program output stay predictable; the renderer only reorders each line when it draws the screen.

Availability

Bidirectional text support requires Otty 1.2.0 or later.

What Otty Does

With Bidirectional (RTL) text enabled, Otty applies the Unicode Bidirectional Algorithm to each display line:

  • Hebrew and Arabic runs are shown right-to-left.
  • Numbers, punctuation, paths, prompts, and Latin words keep their expected placement inside the line.
  • Pure left-to-right output is left untouched.
  • Selection, copy, paste, and search use the original logical text rather than the visual drawing order.

This means a command that prints mixed English and Hebrew/Arabic can be read in the terminal without changing how the program writes bytes to the PTY.

Cursor Movement and Selection

When a line is visually reordered, Otty keeps the caret and selection aligned with what you see on screen. Left and Right arrow navigation follows the visual shape of RTL text, while the underlying text remains in the order your shell or program expects.

This is especially useful at a shell prompt: editing a mixed RTL/LTR command should feel closer to editing text in a native macOS text field, while still sending normal terminal input to the shell.

Apps That Handle BiDi Themselves

Most terminal programs simply print logical-order Unicode text and expect the terminal to display it correctly. For those programs, leave BiDi on.

Some full-screen TUIs lay out RTL columns by themselves. If such an app already does its own visual reordering, Otty's renderer may reorder it again and make the columns look wrong. In that case, turn Bidirectional (RTL) text off for the session or in Settings.

BiDi-aware terminal applications can also opt out for their own session with the standard ECMA-48 Bidirectional Support Mode (BDSM, mode 8). When an app enters explicit BiDi mode, Otty suppresses its implicit per-line reordering until the app returns to implicit mode.

Troubleshooting

If RTL text appears reversed, confirm that Bidirectional (RTL) text is on.

If a TUI's columns look scrambled only when Hebrew or Arabic text is present, try turning the setting off. That usually means the program is doing its own BiDi layout.

If copy/paste seems different from what you see visually, remember that Otty copies logical text. This is intentional: pasted commands, paths, JSON, and log lines should preserve the original byte order.

See Also

Otty