mirror of
https://github.com/warpdotdev/warp.git
synced 2026-05-06 23:32:51 +08:00
## Description Fixes #9213. On macOS, `.command` is the standard extension for double-clickable shell scripts (a `#!/usr/bin/env bash` file you can `chmod +x` and run from Finder). Opening one in Warp's editor today shows "Language support is unavailable for this file type" because `language_by_filename` in `crates/languages/src/lib.rs` doesn't include `command` next to the existing `sh | zsh | bash` shell extensions. ```diff - "sh" | "zsh" | "bash" => language_by_name("shell"), + "sh" | "zsh" | "bash" | "command" => language_by_name("shell"), ``` ## Testing - Added `command_extension_resolves_to_shell` in `crates/languages/src/lib_tests.rs` that calls `language_by_filename(Path::new("script.command"))` and asserts the returned language's `display_name` is `"Shell"` — fails on master, passes after the fix. - `cargo fmt -p languages -- --check` passes locally. - Couldn't run `cargo nextest run -p languages` locally because the Metal toolchain isn't installed (same situation as #9277), so relying on CI for the full clippy / nextest pass. ## Changelog Entries for Stable CHANGELOG-BUG-FIX: `.command` shell scripts now open with shell syntax highlighting in Warp's editor. Co-authored-by: anshul-garg27 <anshul-garg27@users.noreply.github.com>