fix: Able to run 'open .command' file#10543
Conversation
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: JackieTang.
|
|
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 Powered by Oz |
There was a problem hiding this comment.
Overview
This PR adds .command to the Unix runnable shell-script extension allowlist and extends the existing routing/unit tests so executable .command files route to execution instead of the editor.
Concerns
- Manual testing evidence is missing for this user-perceivable file-opening behavior change. Repository guidance requires screenshots or a screen recording that show the behavior working end to end, or a justification for why that evidence cannot be provided.
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
|
Thanks for flagging. I've added a short screen recording under the
Also updated the PR description checkbox for screenshots/video. can not open: can open: |
|
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: Comment Powered by Oz |
Oz no longer requests changes for this pull request after the latest automated review.
There was a problem hiding this comment.
Overview
This PR extends Unix runnable shell script detection to include executable .command files and updates utility and URI-routing regression coverage.
Concerns
- No correctness, security, or spec concerns found in the reviewed diff.
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
4e0b0ee to
97adb9c
Compare
|
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 @Jackie-Tang 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 |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
## Description Allow `.command` files to be executed directly via the `open` command, matching macOS default behavior. Previously, double-clicking or opening a `.command` file in Warp routed to the editor instead of executing it. This change adds `"command"` to the list of extensions recognized by `is_runnable_shell_script` so executable `.command` files are properly run as shell scripts. ## Linked Issue Fixes #9213 - [x] 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 Updated the existing unit tests in `openable_file_type.rs` and URI routing tests in `uri_tests.rs` to cover `.command` files alongside the other shell extensions (`bash`, `zsh`, `fish`, `ksh`). The new cases verify that an executable `.command` file is detected as a runnable shell script and routed to execution rather than the editor. - [x] I have manually tested my changes locally with `./script/run` ### Screenshots / Videos N/A — no UI changes. ## Agent Mode - [ ] Warp Agent Mode - This PR was created via Warp's AI Agent Mode <!-- CHANGELOG-BUG-FIX: Fixed `.command` files not being executed when opened via the `open` command. -->
Description
Allow
.commandfiles to be executed directly via theopencommand, matching macOS default behavior. Previously, double-clicking or opening a.commandfile in Warp routed to the editor instead of executing it.This change adds
"command"to the list of extensions recognized byis_runnable_shell_scriptso executable.commandfiles are properly run as shell scripts.Linked Issue
Fixes #9213
ready-to-specorready-to-implement.Testing
Updated the existing unit tests in
openable_file_type.rsand URI routing tests inuri_tests.rsto cover.commandfiles alongside the other shell extensions (bash,zsh,fish,ksh). The new cases verify that an executable.commandfile is detected as a runnable shell script and routed to execution rather than the editor../script/runScreenshots / Videos
N/A — no UI changes.
Agent Mode