Skip to content

Copy and Paste

How Otty moves text between the terminal and the system clipboard, plus the safety net that catches risky pastes. Everything here is configured in the GUI — no config file needed.

Copy

Select text (see Selection for how), then copy it with ⌘C, Edit ▸ Copy, or the right-click menu. Two GUI toggles under Settings → Controls change how copying works:

SettingDefaultWhat it does
Copy on SelectOffEvery selection drops straight into the clipboard — no ⌘C needed.
Clipboard Trim Trailing SpacesOffStrip trailing spaces from each copied line.

There's also Clear Selection on Copy (off by default) which drops the highlight after an explicit copy — see Selection. To cut (copy and delete in one step), use ⌘X — covered in Input.

Paste

Paste the clipboard with ⌘V, Edit ▸ Paste, or the right-click menu. Otty handles bracketed paste automatically: programs that support it (your shell's line editor, editors, REPLs) receive the text as a single inert block instead of interpreting newlines as Enter.

Right-click to paste

You can make a plain right-click paste (or copy) instead of opening the menu — see Right Click Action in Cursor and Mouse.

Paste protection

Paste Protection (Settings → Controls, on by default) warns you before pasting content that could run something you didn't intend. The confirmation dialog shows a preview and flags:

  • Multi-line text — earlier lines would execute the moment they're pasted.
  • A trailing newline — the command would run on paste, before you can review it.
  • sudo / su — the paste may run with elevated privileges.
  • Control characters — possible terminal-escape injection hidden in the text.

You can always choose Paste Anyway or Cancel. The check is skipped inside full-screen TUIs (vim, less) and, when Paste Bracketed Safe (on by default) is enabled, for programs that advertise bracketed-paste support — since those receive the paste inertly anyway.

Paste as…

Edit ▸ Paste as transforms the clipboard before it reaches the shell:

VariantWhat it sends
Paste SelectionPastes the current text selection instead of the clipboard (the middle-click convention from X11 terminals).
Paste File Base64-Encoded…Base64-encodes a file so you can ferry binary content over a plain text session.
Paste Escaping Special CharactersShell-escapes the text so spaces and special characters land as literals — ideal for a pasted file path.
Bracketed PasteForces bracketed-paste markers even if the program didn't ask for them.
Paste and continue in ComposerAppends the clipboard to your Composer draft instead of the prompt.

Clipboard access from programs

Terminal programs can read and write the system clipboard through the OSC 52 escape sequence (tmux, vim with a clipboard plugin, remote sessions over SSH). You decide how much access they get under Settings → Advanced → All Settings:

SettingDefaultWhat it controls
Clipboard WriteAllowA program copying to your clipboard.
Clipboard ReadAskA program reading from your clipboard.

Each can be set to Allow, Ask (prompt every time), or Deny. Read defaults to Ask because letting a remote program silently read your clipboard is the riskier direction.

See also

  • Selection — selecting text, Copy on Select, and selection-clearing options.
  • Input — keyboard shortcuts, Cut, the Composer, and the Prompt Queue.
  • Cursor and Mouse — the Right Click Action setting and mouse reporting.

Otty