lua: add wezterm.default_wsl_domains()

This returns the default set of domains that would be populated
in the wsl_domains config.  This is useful if you want to override
eg: the default_prog for specific domain(s), or want to otherwise
add additional variations on the default list.
This commit is contained in:
Wez Furlong committed 2022-01-08 15:07:36 -07:00
1 parent b2ee6793f9
commit 2f9ca151c2
1 file changed
+5
+5
View File
@@ -106,6 +106,11 @@ pub fn make_lua_context(config_file: &Path) -> anyhow::Result<Lua> {
lua.create_function(|_, ()| Ok(crate::running_under_wsl()))?,
)?;
wezterm_mod.set(
"default_wsl_domains",
lua.create_function(|_, ()| Ok(crate::WslDomain::default_domains()))?,
)?;
wezterm_mod.set(
"get_builtin_color_schemes",
lua.create_function(|_, ()| Ok(crate::COLOR_SCHEMES.clone()))?,