[FEATURE] Provide the ability to disable indentation in CLI for clipboard to function properly

Resolved 💬 3 comments Opened Apr 22, 2026 by queglay Closed May 26, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

There are duplicates for this problem but they are all closed due to inactivity but I feel they deserve to be reopened. It's frustrating not being able to use a clipboard with Claude CLI.

Description

When Claude Code outputs multi-line code blocks (e.g., shell commands), the rendered output includes horizontal padding on both sides. When a user selects and copies this text from the terminal to paste into another terminal or SSH session, the padding characters get included in the copied text, breaking the command.

Steps to Reproduce

Ask Claude Code to output a multi-line shell command in a code block
Select the rendered output in the terminal
Copy and paste it into another terminal window or SSH session
Expected Behavior

Copied text from code blocks should be clean and directly pasteable without extra whitespace or padding characters.

Actual Behavior

The padding around the code block content gets included when copying, which breaks the pasted command.

Impact

This is especially painful when Claude outputs commands that need to be run on a remote server (where Claude can't execute them directly). The user has to manually clean up every pasted command, which defeats the purpose of having Claude generate them.

Proposed Solution

Provide a setting to disable indentation, or allow us to ask claude for output without indentation.

Alternative Solutions

_No response_

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗