跳到正文
原文
Reddit · ClaudeCode / Codex / VibeCoding· /u/kbrianps·· 23小时前AI 评分51

一个修复 Claude Code 终端复制粘贴问题的插件

原文标题:I made a plugin that fixes copy-paste from the Claude Code terminal (no more gutter bar and broken lines)

AI 导读

作者发布 clean-copy 插件,修复从 Claude Code 全屏 TUI 复制文本时带出左边栏、换行被拆成硬换行的问题,复制后自动去掉边栏和缩进并把断行合并回一行,列表、代码块和表格保持原样。

正文

当前语言的正文正在等待翻译,暂时显示原文。

Copying text from Claude Code's fullscreen TUI gives you the text as drawn on screen: the bar from the left margin comes along, and every wrapped row becomes a hard line break in the middle of a sentence. There is a tracking issue with 42 reports of this (anthropics/claude-code#81472).

I wrote a small plugin that fixes the clipboard right after you select: it removes the bar and the indentation and joins the wrapped rows back into one line. List items, code blocks and tables are left alone.

Before:

The retry logic lives in the queue worker, not in the HTTP client, so a

failed upload is retried with the same idempotency key and the server can

drop the duplicate instead of storing the file twice.

After:

The retry logic lives in the queue worker, not in the HTTP client, so a failed upload is retried with the same idempotency key and the server can drop the duplicate instead of storing the file twice.

Install:

claude plugin marketplace add kbrianps/claude-clean-copy

claude plugin install clean-copy@claude-clean-copy

Repo: https://github.com/kbrianps/claude-clean-copy

Honest limits: tested only on Ubuntu (Wayland) with Ghostty; X11 and macOS should work but are untested; no Windows. It rewrites the clipboard after the copy, so pasting within half a second of releasing the mouse can still get the raw text. The plugin API is early access, so it may break on an update.

It works this way because copy on select does not go through the plugin copy event. I asked for that in anthropics/claude-code#99758; a thumbs up there helps.

来源:Reddit · ClaudeCode / Codex / VibeCoding · reddit.com