Skip to content

Fix empty RPROMPT handling in zsh.#11868

Merged
vorporeal merged 3 commits into
masterfrom
david/fix-empty-rprompt-handling
May 29, 2026
Merged

Fix empty RPROMPT handling in zsh.#11868
vorporeal merged 3 commits into
masterfrom
david/fix-empty-rprompt-handling

Conversation

@vorporeal
Copy link
Copy Markdown
Contributor

@vorporeal vorporeal commented May 29, 2026

Description

Fixes a zsh-specific issue where long commands could gain a duplicated leading character in finished command blocks after wrapping while using Warp's prompt.

When Warp hides a user-defined right prompt, the zsh bootstrap was recreating RPROMPT as an empty zero-width prompt. Although it rendered no visible content, zsh still performed right-prompt layout and redraw behavior, which could corrupt the captured command grid. This change leaves RPROMPT unset in Warp prompt mode, while preserving handling for real non-empty right prompts, and adds regression coverage for that behavior.

Linked Issue

N/A

Testing

  • cargo fmt --all --manifest-path Cargo.toml --check
  • git diff --check
  • cargo check --manifest-path Cargo.toml -p integration
  • cargo nextest run --manifest-path Cargo.toml --no-fail-fast -p integration -E 'test(test_warp_prompt_unsets_zsh_rprompt)'
  • Manually reproduce the wrapped zsh command behavior after launching locally with ./script/run.

Screenshots / Videos

Not attached; manual end-to-end reproduction verification is pending.

Agent Mode

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

Changelog Entries for Stable

CHANGELOG-BUG-FIX: Fixed duplicated leading characters in wrapped zsh command blocks when using the Warp prompt.

Co-Authored-By: Oz oz-agent@warp.dev

@cla-bot cla-bot Bot added the cla-signed label May 29, 2026
Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@vorporeal vorporeal marked this pull request as ready for review May 29, 2026 16:09
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 29, 2026

@vorporeal

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

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

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

Powered by Oz

@vorporeal vorporeal enabled auto-merge (squash) May 29, 2026 16:09
Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

Overview

This PR adjusts zsh bootstrap handling so Warp prompt mode no longer synthesizes an empty RPROMPT, and adds zsh integration coverage for the unset right-prompt behavior.

Concerns

  • For this user-facing terminal rendering change, please include screenshots or a short screen recording demonstrating the wrapped zsh command behavior working end to end. The PR description currently says screenshots/videos are not attached and manual end-to-end reproduction is pending.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

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

Powered by Oz

@vorporeal vorporeal force-pushed the david/fix-empty-rprompt-handling branch from 329bb6f to de69fb9 Compare May 29, 2026 16:40
@vorporeal vorporeal force-pushed the david/fix-empty-rprompt-handling branch from de69fb9 to 0865c78 Compare May 29, 2026 18:31
@vorporeal vorporeal merged commit e59e4aa into master May 29, 2026
26 checks passed
@vorporeal vorporeal deleted the david/fix-empty-rprompt-handling branch May 29, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants