Do Clipboard Managers Work Inside Terminal Apps?

Yes, on macOS they do. Terminal.app, iTerm2, Ghostty, Alacritty, kitty, WezTerm and Warp all copy and paste through the standard system pasteboard. A clipboard manager like Maccy records what you copy there and can paste it back into the terminal. The exceptions are tmux’s internal buffers, text copied on a remote SSH host, and a few security settings, all covered below.

Why do clipboard managers work in terminals at all?

A clipboard manager doesn’t hook into individual apps. It watches the system-wide pasteboard (NSPasteboard.general in macOS terms) and stores each new entry. Anything that writes to that pasteboard is visible to it, whether that’s a browser, a text editor or a terminal emulator.

Terminal emulators on macOS are ordinary Cocoa or GPU-rendered apps. When you select text and press Cmd+C, the emulator writes the selection to the general pasteboard. Cmd+V reads from it. The command-line tools pbcopy and pbpaste do the same from the shell. So a pasteboard-based tool like Maccy App sees terminal copies the same way it sees copies from Safari or Notes.

Compatibility at a glance

Scenario Captured by a clipboard manager? Notes
Select text, Cmd+C in Terminal.app / iTerm2 / Ghostty / Alacritty / kitty / WezTerm / Warp Yes Standard system pasteboard write.
echo hello | pbcopy Yes Writes to the general pasteboard. This is the easiest way to test your setup.
iTerm2 « copy on selection » Yes Every selection becomes a history entry, which can be noisy. Check iTerm2’s selection settings.
Copy inside tmux copy-mode (default config) Usually no Goes to tmux’s internal buffer unless you bridge it (see below).
Copy inside Vim/Neovim with "+y Depends on build Needs clipboard support (a clipboard-enabled Vim build, or Neovim’s pbcopy provider). Plain y stays inside the editor.
Text selected in an SSH session Only if the terminal supports it The remote machine has no access to your Mac’s pasteboard. OSC 52 can bridge it.
Pasting a history item into the terminal Yes Delivered as plain text; rich formatting is ignored.

How do you test it in 30 seconds?

  1. Open any terminal and run echo "clipboard test $(date +%s)" | pbcopy.
  2. Open your clipboard manager’s history. In Maccy, the default shortcut is Shift+Cmd+C.
  3. The newest entry should be the test string. If so, capture works.
  4. Select it and paste back into the terminal. If that works too, you’re done.

If capture works but pasting back doesn’t, the issue is almost always permissions. See the next section.

Why won’t my clipboard manager paste into the terminal?

Maccy Mac can copy a history item to the clipboard so that you press Cmd+V yourself, or it can paste for you. The paste-for-you mode works by sending a synthetic Cmd+V to the frontmost app, which requires macOS Accessibility permission.

Check these in order:

  1. Accessibility permission. Open System Settings → Privacy & Security → Accessibility and confirm Maccy is enabled. If it’s listed but not working, toggle it off and on, or remove and re-add it (this is common after updating macOS or the app).
  2. Auto-paste setting. In Maccy’s settings, check that automatic pasting is on. Otherwise Maccy only copies the item to the clipboard and you paste manually.
  3. Secure Keyboard Entry. Terminal.app (Terminal → Secure Keyboard Entry) and iTerm2 (iTerm2 → Secure Keyboard Entry) can enable this protection against keystroke sniffing. It can interfere with some tools that watch or inject keyboard input. Whether it affects your clipboard manager’s hotkey or auto-paste depends on how the tool is implemented. If you hit problems, toggle it off for a test, and fall back to manual Cmd+V if you want to keep it on.
  4. Keybinding conflicts. Some terminals bind Shift+Cmd+C to their own actions (for example, copy variants in some emulators). If the history window never opens inside one app, change Maccy’s global shortcut.

What about tmux, Vim and SSH?

This is where « it doesn’t work in terminals » complaints usually originate. The clipboard manager is fine; the data never reaches the macOS pasteboard.

tmux

tmux keeps its own paste buffers. Selecting text in copy-mode stores it there, not in the system clipboard. Two common fixes:

  • Pipe copies to pbcopy with a binding such as bind -T copy-mode-vi y send -X copy-pipe-and-cancel "pbcopy".
  • Enable the set-clipboard option so tmux emits OSC 52 sequences to your terminal. Your terminal must also allow clipboard access (see below).

Mouse selection inside tmux is another common source of confusion. With mouse mode on, drag-selection is handled by tmux rather than the terminal. Many terminals let you hold a modifier key (often Option) to bypass tmux and use native selection. The exact key varies by terminal.

Vim and Neovim

Yanking with plain y stays in Vim’s unnamed register. To reach the system clipboard, yank into the + register ("+y) or set clipboard=unnamedplus. This requires a Vim build with clipboard support. Not every Vim build has it, so check with vim --version | grep clipboard and look for +clipboard. Neovim uses pbcopy/pbpaste on macOS automatically when they’re available.

SSH sessions

Text you select in a remote vim or tmux lives on a machine that can’t touch your Mac’s pasteboard. If you select it with your mouse at the terminal level, it’s copied locally like any other on-screen text. If an application on the remote side wants to set your local clipboard, it needs OSC 52, an escape sequence that asks the terminal to do it.

Support varies by terminal and is often disabled by default for security reasons. In iTerm2, the relevant option is under Settings → General → Selection (« Applications in terminal may access clipboard »). Many other modern terminals (kitty, WezTerm, Alacritty, Ghostty) have their own OSC 52 settings; check their documentation. Be aware that allowing remote programs to write to your clipboard is a real trust decision.

Is it safe to use a clipboard manager with a terminal?

Mostly, with two caveats worth taking seriously.

1. Secrets end up in history

Commands like pass -c, op read ... | pbcopy, or copying an API key out of a .env file put sensitive text on the pasteboard, and any history-keeping tool will store it. Well-behaved password managers mark their copies as concealed or transient so clipboard managers skip them (a convention from nspasteboard.org). Maccy Clipboard honors those markers . But plain pbcopy doesn’t set them, so the shell can’t opt out for you.

Practical options:

  • Use Maccy’s ignore settings (Settings → Ignore) to skip specific apps, pasteboard types or text patterns via regular expressions. For example, you could ignore anything matching a known token prefix such as ^ghp_ for GitHub tokens or ^sk- for some API keys.
  • Ignoring the terminal app entirely is possible but heavy-handed, since it also drops every harmless command you copy. Whether app-level ignore reliably catches pbcopy output from a terminal depends on how the source app is detected.
  • Delete sensitive entries from history right after use.
  • Prefer tools that don’t touch the clipboard at all, like op run or environment injection, over copying secrets by hand.

Because Maccy is open source and keeps history locally on your Mac, nothing is sent to a server. That limits exposure compared with cloud-synced managers, but local storage still means anything you copied is on disk until cleared.

2. Paste hijacking

A malicious web page can put different text on your clipboard than what it displays, for example a harmless-looking command with a hidden newline and a second command. Pasting multi-line text into a shell can run it immediately. Most modern terminals and shells support bracketed paste mode, which holds multi-line pastes until you press Return. Make sure it’s active (recent zsh enables it by default; in bash it’s controlled by enable-bracketed-paste in readline). A clipboard manager makes it easy to preview an entry before pasting, which is a useful habit for anything copied from the web.

Practical tips for terminal-heavy workflows

  • Pin your boilerplate. Frequently reused one-liners (SSH hosts, docker flags, kubectl contexts) can be pinned in Maccy so they survive history limits.
  • Use search. Instead of scrolling through history, type a few characters of the command you need.
  • Mind history size. Large log dumps copied from the terminal can bloat history. Lower the history size in settings if that bothers you.
  • Multi-line commands. If a pasted command gets mangled, check whether the terminal’s paste-protection prompt or bracketed paste is changing behavior, not the clipboard manager.

Frequently asked questions

Does Maccy work with iTerm2?

Yes. iTerm2 uses the system pasteboard for copy and paste, so Maccy captures its copies and can paste into it. If auto-paste fails, check Maccy’s Accessibility permission and iTerm2’s Secure Keyboard Entry setting.

Why doesn’t my tmux selection show up in clipboard history?

tmux stores copy-mode selections in its own buffer. Bind a copy-mode key to pipe into pbcopy, or enable OSC 52 through set-clipboard and allow it in your terminal.

Do clipboard managers record text copied over SSH?

Only if you copy it at the terminal level (selecting on-screen text) or the remote app uses OSC 52 and your terminal permits it. Otherwise the remote clipboard is invisible to your Mac.

Will a clipboard manager store my passwords from the terminal?

If you copy a secret with pbcopy or by selecting it, it will be stored like any other text. Use ignore rules, delete entries after use, or avoid copying secrets at all.

Can I paste with formatting into a terminal?

No. Terminals work with plain text, so styling is discarded when you paste, regardless of which clipboard manager you use.

The bottom line

Clipboard managers work fine in terminals because terminals use the same macOS pasteboard as everything else. When something seems broken, it’s nearly always one of three things: an app with its own buffer (tmux, Vim), a remote session with no path to your Mac’s clipboard, or a permission such as Accessibility. Sort those out, add an ignore rule for secrets, and your history becomes one of the most useful tools in a command-line workflow.

If you want to try it, Maccy is free and open source. Which clipboard gap bites you most often: tmux, remote sessions, or something else?


Autres actus

19 novembre 2026

재택근무 클립보드 매니저 추천 2026: Mac 사용자를 위한...

재택근무 클립보드 매니저 추천 2026: Mac 사용자를 위한 비교 빠른 답변: 맥으로 재택근무를 하는 대부분의 사용자에게 가장 좋은 클립보드 매니저는 […]

En savoir plus

घर से काम करने के लिए सबसे अच्छा...

घर से काम करने के लिए सबसे अच्छा क्लिपबोर्ड मैनेजर (2026) संक्षिप्त उत्तर: Mac पर घर से काम करने वाले […]

En savoir plus

在宅勤務に最適なクリップボードマネージャー【2026年版】Mac向けに徹底比較

在宅勤務に最適なクリップボードマネージャー【2026年版】Mac向けに徹底比較 結論: 在宅勤務のMacユーザーにとって最適なクリップボードマネージャーは、作業の邪魔をせず、データを自分のマシン内に留め、一日中使っても費用がかからないものです。その条件を満たすのがMaccyで、無料・オープンソース・ローカル完結です。複数のAppleデバイス間でクリップボード履歴を同期したいなら、Pasteのような有料アプリが向いています。すでにランチャーを使い込んでいる人は、RaycastやAlfredでも基本的な用途はカバーできます。 在宅で働くと、コピー&ペーストの回数はむしろ増えます。ブラウザのタブにあるチケット番号、カレンダーの会議リンク、メールに書かれた取引先の住所、1時間前に自分が書いた返信の一部。これを一日に何十回も、たいていは会議中に繰り返しますが、macOS標準のクリップボードが覚えているのは直前にコピーした1件だけです。 この記事では、2026年時点で在宅Macの環境に現実的な選択肢を比較します。あわせて、リモートワークならではの判断軸(自宅ネットワークでのプライバシー、複数デバイス、画面共有)と、各ツールの正直なトレードオフも整理します。 在宅勤務でもクリップボードマネージャーは必要? 1日に数回以上コピー&ペーストするなら、おそらく必要です。標準のクリップボードは1件しか保持できません。クリップボードマネージャーなら検索可能な履歴が残るので、20分前にコピーしたものも、別のものをコピーして消えてしまうことなく、ショートカット一つで呼び出せます。 macOS Tahoe以降、Spotlightに簡易的なクリップボード履歴が入りました。まず試すには十分ですが、保持期間は短く(リリース時点では約8時間 [要確認:現在の仕様])、「今朝コピーしたものは何だっけ」には対応できても、「先週火曜に使ったあのコマンドは?」には向きません。この制限が気にならないなら、ほかに何も要らないかもしれません。気になるなら、先を読み進めてください。 在宅勤務でクリップボードマネージャーを選ぶ際のポイントは? オフィス向けの紹介記事は機能の多さに目が行きがちですが、リモートワークでは優先順位が変わります。 プライバシー。パスワード、APIキー、顧客データ、個人的なメッセージをコピーする機会が多く、しかも自分で管理する自宅ネットワーク上で作業しています。履歴をローカルにだけ保存し、外部へアップロードしないツールなら、リスクの種類そのものを減らせます。 機密情報のコピーの扱い。優れたマネージャーは、パスワードマネージャーが「秘匿されたクリップボード内容」を示すために使う慣習を尊重し、特定のアプリを丸ごと除外する設定も用意しています。 通話中の操作スピード。会話しながら操作することが多いので、グローバルショートカット、即時検索、マウスを使わないペーストが欠かせません。 画面共有との相性。直近50件のコピー履歴が表示されるポップアップは、共有画面ではやや気まずいものです。非表示にしたり、すばやく閉じたりできるかを確認しましょう。 複数デバイスでの利用。自宅ではMac mini、外出先ではMacBookという使い方なら、同期は重要です。逆に、まったく不要な人もいます。 コストとロックイン。一日中使うユーティリティにサブスクリプションを払い続けると、積み重なります。オープンソースなら、そもそもその心配がありません。 主要なクリップボードマネージャーを比較すると? […]

En savoir plus