mirror of
https://github.com/openai/codex.git
synced 2026-04-29 08:56:38 +00:00
10 lines
271 B
Rust
10 lines
271 B
Rust
use crate::error::Error;
|
|
use crate::error::Result;
|
|
|
|
pub fn tokenize_command(raw: &str) -> Result<Vec<String>> {
|
|
shlex::split(raw).ok_or_else(|| Error::TokenizationFailed {
|
|
example: raw.to_string(),
|
|
reason: "invalid shell tokens".to_string(),
|
|
})
|
|
}
|