yazi-proxy 26.1.22

Yazi event proxy
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use yazi_macro::{emit, relay};
use yazi_parser::cmp::ShowOpt;
use yazi_shared::Id;

pub struct CmpProxy;

impl CmpProxy {
	pub fn show(opt: ShowOpt) {
		emit!(Call(relay!(cmp:show).with_any("opt", opt)));
	}

	pub fn trigger(word: impl Into<String>, ticket: Id) {
		emit!(Call(relay!(cmp:trigger, [word.into()]).with("ticket", ticket)));
	}
}