fix: warp-terminal --help shows Warp Terminal CLI, not Oz (#9726)#9907
fix: warp-terminal --help shows Warp Terminal CLI, not Oz (#9726)#9907Barba2k2 wants to merge 1 commit intowarpdotdev:masterfrom
Conversation
When the binary is invoked as `warp-terminal*` on Linux, override the Oz-flavored CLI display name and about text so users see help relevant to the terminal app they launched. Subcommands are unchanged. Fixes warpdotdev#9726
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @Barba2k2 on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
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: @bnavetta. Comment Powered by Oz |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
There was a problem hiding this comment.
Overview
This PR updates the Warp CLI command construction so Linux warp-terminal* invocations render Warp Terminal-oriented top-level help instead of the Oz CLI description, with regression coverage for known channel binary names and removed Oz tagline text.
Concerns
- No blocking correctness or security concerns found in the changed lines.
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
bnavetta
left a comment
There was a problem hiding this comment.
Hi, per my comment on #9726 (comment), the CLI help output is as intended.
Swapping the command name based on the executable does seem like a reasonable compromise. I’m open to this approach if you’d like to update the PR, but also understand if you’d rather not given the future directions I outlined (e.g more dedicated terminal commands).
|
|
||
| /// Override the Oz-flavored CLI metadata (display name, about) so that the help text | ||
| /// reflects the Warp Terminal app the user invoked. | ||
| fn customize_for_warp_terminal(command: clap::Command) -> clap::Command { |
There was a problem hiding this comment.
I think it’ll be easier to follow the overall control flow if this is folded into the main command-customization function.
| /// reflects the Warp Terminal app the user invoked. | ||
| fn customize_for_warp_terminal(command: clap::Command) -> clap::Command { | ||
| command.display_name("Warp Terminal CLI").about( | ||
| r#"The Warp Terminal command-line interface. |
There was a problem hiding this comment.
Could you leave the help/about output as-is? I think this will clash with the changes we make above.
| /// installed binary on Linux. Matches all channels: `warp-terminal`, | ||
| /// `warp-terminal-preview`, `warp-terminal-dev`, `warp-terminal-local`, | ||
| /// `warp-terminal-integration`, and `warp-terminal-oss`. | ||
| fn is_warp_terminal_binary(bin_name: &str) -> bool { |
There was a problem hiding this comment.
This will only work on Linux - on Windows and macOS, there’s no -terminal suffix.
Description
Fixes #9726.
When the
warpbinary is installed on Linux aswarp-terminal*, the user invokes a terminal app — but--helpwas describing the Oz cloud-agent CLI ("The orchestration platform for cloud agents…"), which is confusing for users who aren't using Oz/cloud agents.This change detects the
warp-terminal*binary name inArgs::clap_command()and overridesdisplay_nameandaboutso the help text reflects the Warp Terminal CLI. Subcommands are unchanged (they're shared withoz).Linked Issue
ready-to-implement(triaged bug).Testing
Two unit tests added in
crates/warp_cli/src/lib_tests.rs:warp_terminal_binary_detection— covers all six channel names (warp-terminal,-preview,-dev,-local,-integration,-oss) plus negative cases (oz,warp,warp-oss).warp_terminal_help_does_not_mention_oz— regression test that asserts the rendered long help no longer contains "orchestration platform for cloud agents" or "Oz CLI is a tool".Verified locally on WSL Ubuntu (Rust 1.92.0):
cargo test -p warp_cli --lib→ 143 passed, 0 failedcargo clippy -p warp_cli --all-targets --tests -- -D warnings→ cleancargo fmt --check(workspace) → cleanFull-workspace
clippy --workspaceandnextest run --workspacewere skipped locally due to time, but the change is private (private fns insidewarp_cli) with no public API impact, so cross-crate breakage is not possible.Agent Mode
CHANGELOG-BUG-FIX: Fixed
warp-terminal --helpshowing the Oz CLI description instead of the Warp Terminal CLI description.