Feature request: keybinding to copy last response as plain text to clipboard
Use case
When working in the terminal (iTerm2), Claude's text output includes indentation/tabs added by the terminal renderer. Selecting and copying this text brings along the whitespace, which breaks formatting when pasting into apps like Slack, email, etc.
VS Code's Claude Code extension handles this fine (click to copy), but the CLI has no equivalent.
Proposed solution
Add a keybinding action like chat:copyLastResponse that copies Claude's last response as plain text (no terminal rendering artifacts) to the system clipboard via pbcopy (macOS) / xclip (Linux).
Ideally mappable in ~/.claude/keybindings.json:
[
{ "key": "ctrl+shift+c", "action": "chat:copyLastResponse" }
]
Current workaround
Ask Claude to pipe the text through pbcopy via Bash, which works but adds friction to the workflow.
Environment
- Claude Code CLI 2.1.84
- iTerm2 on macOS
- Issue does not occur in VS Code extension (has click-to-copy)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗