mirror of
https://github.com/openai/codex.git
synced 2026-04-29 17:06:51 +00:00
first pass at prefix rules
This commit is contained in:
9
codex-rs/execpolicy2/src/command.rs
Normal file
9
codex-rs/execpolicy2/src/command.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
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(),
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user