Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ In the codex-rs folder where the rust code lives:
- Implementations may still use `async fn foo(&self, ...) -> T` when they satisfy that contract.
- Do not use `#[allow(async_fn_in_trait)]` as a shortcut around spelling the future contract explicitly.
- When writing tests, prefer comparing the equality of entire objects over fields one by one.
- Do not add tests for values that are statically defined.
- Do not add negative tests for logic that was removed.
- Do not add general product or user-facing documentation to the `docs/` folder. The official Codex documentation lives elsewhere. The exception is app-server API documentation, which is covered by the app-server guidance below.
- Prefer private modules and explicitly exported public crate API.
- If you change `ConfigToml` or nested config types, run `just write-config-schema` to update `codex-rs/core/config.schema.json`.
Expand Down
6 changes: 5 additions & 1 deletion codex-rs/shell-command/src/shell_detect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ fn get_zsh_shell(path: Option<&PathBuf>) -> Option<DetectedShell> {
})
}

const BASH_FALLBACK_PATHS: &[&str] = &["/bin/bash"];
const BASH_FALLBACK_PATHS: &[&str] = &["/bin/bash", "/usr/bin/bash"];

fn get_bash_shell(path: Option<&PathBuf>) -> Option<DetectedShell> {
let shell_path = get_shell_path(ShellType::Bash, path, "bash", BASH_FALLBACK_PATHS);
Expand Down Expand Up @@ -327,6 +327,10 @@ mod tests {
detect_shell_type(PathBuf::from("/bin/bash")),
Some(ShellType::Bash)
);
assert_eq!(
detect_shell_type(PathBuf::from("/usr/bin/bash")),
Some(ShellType::Bash)
);
assert_eq!(
detect_shell_type(PathBuf::from("powershell.exe")),
Some(ShellType::PowerShell)
Expand Down
Loading