mirror of
https://github.com/openai/codex.git
synced 2026-04-26 07:35:29 +00:00
feat: add shell snapshot for shell command (#7786)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user