feat: add shell snapshot for shell command (#7786)

This commit is contained in:
jif-oai
2025-12-11 13:46:43 +00:00
committed by GitHub
parent b2280d6205
commit 29381ba5c2
14 changed files with 301 additions and 129 deletions

View File

@@ -181,6 +181,16 @@ pub fn format_with_current_shell_display(command: &str) -> String {
shlex::try_join(args.iter().map(String::as_str)).expect("serialize current shell command")
}
pub fn format_with_current_shell_non_login(command: &str) -> Vec<String> {
codex_core::shell::default_user_shell().derive_exec_args(command, false)
}
pub fn format_with_current_shell_display_non_login(command: &str) -> String {
let args = format_with_current_shell_non_login(command);
shlex::try_join(args.iter().map(String::as_str))
.expect("serialize current shell command without login")
}
pub mod fs_wait {
use anyhow::Result;
use anyhow::anyhow;