Architecture

Shell Integration

OSC escape sequences, resource detection, and live UI updates
Properties3
Is BaseNo
Iconi-lucide-plug
Order40

OSC Escape Sequences

Ghostty's shell integration injects OSC escape sequences into bash, zsh, fish, elvish, and nushell:

SequenceContentEffect in Kytos
OSC 0 / OSC 2Process titleToolbar title and subtitle
OSC 7Working directory URINavigator pane label

These sequences fire automatically when the shell changes directory or launches a process.

Shell Integration Scripts

Shell integration scripts are bundled at:

Kytos.app/Contents/Resources/ghostty/shell-integration/
  bash-integration.bash
  zsh-integration.zsh
  fish/functions/
  elvish/
  nushell/

Ghostty's shell integration activates when TERM=xterm-ghostty. No .bashrc or .zshrc changes needed.

Resource Detection

libghostty walks up from the executable path looking for:

<ancestor>/Contents/Resources/terminfo/78/xterm-ghostty

78/ is the standard terminfo hash bucket for xterm-ghostty (0x78 = 'x'). When found, Ghostty sets resources_dir to <ancestor>/Contents/Resources/ghostty.

The "Copy Ghostty Resources" pre-build script in project.yml copies these files from Resources/ (populated by pixi run build-ghostty) into the app bundle.