Skip to content

Include PS1 prompts when copying blocks#13076

Open
SkyNotSilent wants to merge 1 commit into
warpdotdev:masterfrom
SkyNotSilent:codex/fix-9123-copy-ps1-prompt
Open

Include PS1 prompts when copying blocks#13076
SkyNotSilent wants to merge 1 commit into
warpdotdev:masterfrom
SkyNotSilent:codex/fix-9123-copy-ps1-prompt

Conversation

@SkyNotSilent

Copy link
Copy Markdown

Description

When a user copies a block with a custom PS1 prompt, include the visible prompt text along with the command and output. Warp prompt mode keeps the previous behavior and copies only the command and output.

This revives the prompt-mode-gated behavior discussed in the now-closed #10181, with current unit and integration coverage.

Linked Issue

Closes #9123

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Testing

  • cargo test -p warp test_command_and_output_to_string --lib
  • cargo run -p integration --bin integration -- test_copy_block_command_and_output_honor_ps1_disabled
  • cargo run -p integration --bin integration -- test_copy_block_command_and_output_honor_ps1_enabled
  • cargo test -p integration test_copy_block_command_and_output_honor_ps1 -- --nocapture
  • git diff --check
  • I have manually tested my changes locally with ./script/run

cargo nextest is not installed on my local machine, so I validated the shell integration harness through cargo test -p integration ... instead.

Screenshots / Videos

Recorded integration test evidence for the PS1-enabled copy path:

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-BUG-FIX: Include custom PS1 prompt text when copying terminal blocks.

@cla-bot cla-bot Bot added the cla-signed label Jun 26, 2026
@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label Jun 26, 2026
@SkyNotSilent

Copy link
Copy Markdown
Author

/oz-review

@oz-for-oss

oz-for-oss Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

@SkyNotSilent

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I reviewed this pull request and requested human review from: @zachbai.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss

oz-for-oss Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

@SkyNotSilent

I'm re-reviewing this pull request in response to a review request.

You can view the conversation on Warp.

I reviewed this pull request and requested human review from: @zachbai.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR updates block copying so command-and-output copies include the visible PS1 prompt path while preserving Warp prompt behavior, and adds unit plus integration coverage for both enabled and disabled Honor PS1 modes.

Concerns

  • No blocking correctness, security, or spec-alignment concerns found.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot requested a review from zachbai June 26, 2026 05:34

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR updates block copy behavior so CommandAndOutput copies include the visible PS1 prompt/rprompt when PS1 prompt mode is enabled, while preserving the existing Warp prompt behavior. It also adds unit coverage for the block string conversion and integration coverage for both honor_ps1 states.

Concerns

  • No blocking correctness, security, or spec-alignment concerns found in the changed lines.
  • User-facing visual evidence is included in the PR description.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Regression] Three-dots → Copy excludes terminal prompt line from block

1 participant