From 2f9ca151c2559bde0c6eec537fcca2eb14adff7a Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 8 Jan 2022 15:07:36 -0700 Subject: [PATCH] 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. --- config/src/lua.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/src/lua.rs b/config/src/lua.rs index 3ac526959..f64ea25da 100644 --- a/config/src/lua.rs +++ b/config/src/lua.rs @@ -106,6 +106,11 @@ pub fn make_lua_context(config_file: &Path) -> anyhow::Result { 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()))?,