yazi-plugin 26.5.6

Yazi plugin system
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use mlua::{Function, Lua};

use super::Utils;

impl Utils {
	pub(super) fn target_os(lua: &Lua) -> mlua::Result<Function> {
		lua.create_function(|_, ()| Ok(std::env::consts::OS))
	}

	pub(super) fn target_family(lua: &Lua) -> mlua::Result<Function> {
		lua.create_function(|_, ()| Ok(std::env::consts::FAMILY))
	}
}