diff --git a/app/src/uri/uri_tests.rs b/app/src/uri/uri_tests.rs index 76384fc505..55f8c50b5a 100644 --- a/app/src/uri/uri_tests.rs +++ b/app/src/uri/uri_tests.rs @@ -608,7 +608,7 @@ fn test_open_file_non_executable_sh_routes_to_editor() { fn test_open_file_executable_bash_zsh_fish_route_to_execute() { use std::os::unix::fs::PermissionsExt; let dir = tempfile::tempdir().unwrap(); - for name in ["run.bash", "run.zsh", "run.fish"] { + for name in ["run.bash", "run.zsh", "run.fish", "run.command"] { let p = dir.path().join(name); std::fs::write(&p, b"#!/bin/sh\n:\n").unwrap(); std::fs::set_permissions(&p, std::fs::Permissions::from_mode(0o755)).unwrap(); diff --git a/app/src/util/openable_file_type.rs b/app/src/util/openable_file_type.rs index ef1366c24e..c8daf43275 100644 --- a/app/src/util/openable_file_type.rs +++ b/app/src/util/openable_file_type.rs @@ -119,7 +119,7 @@ pub fn is_runnable_shell_script(path: &Path) -> bool { .and_then(|e| e.to_str()) .map(|e| e.to_ascii_lowercase()); if let Some(ext) = ext.as_deref() { - return matches!(ext, "sh" | "bash" | "zsh" | "fish" | "ksh"); + return matches!(ext, "sh" | "bash" | "zsh" | "fish" | "ksh" | "command"); } starts_with_shebang(path) } @@ -445,7 +445,7 @@ mod tests { fn test_is_runnable_shell_script_other_shell_extensions() { use std::os::unix::fs::PermissionsExt; let dir = tempfile::tempdir().unwrap(); - for name in ["run.bash", "run.zsh", "run.fish", "run.ksh"] { + for name in ["run.bash", "run.zsh", "run.fish", "run.ksh", "run.command"] { let p = dir.path().join(name); std::fs::write(&p, b"#!/bin/sh\n:\n").unwrap(); std::fs::set_permissions(&p, std::fs::Permissions::from_mode(0o755)).unwrap();