mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-23 15:51:03 +00:00
19 lines
473 B
Rust
19 lines
473 B
Rust
use std::{borrow::Cow, ffi::OsString};
|
|
|
|
use tokio::sync::oneshot;
|
|
use yazi_config::opener::OpenerRule;
|
|
use yazi_shared::{event::CmdCow, url::Url};
|
|
|
|
// --- Exec
|
|
pub struct ProcessExecOpt {
|
|
pub cwd: Url,
|
|
pub opener: Cow<'static, OpenerRule>,
|
|
pub args: Vec<OsString>,
|
|
pub done: Option<oneshot::Sender<()>>,
|
|
}
|
|
|
|
impl TryFrom<CmdCow> for ProcessExecOpt {
|
|
type Error = ();
|
|
|
|
fn try_from(mut c: CmdCow) -> Result<Self, Self::Error> { c.take_any("option").ok_or(()) }
|
|
}
|