use similar approach to 67d4ba9f76
closes: https://github.com/wez/wezterm/pull/6337
closes: https://github.com/wez/wezterm/issues/6336
use similar approach to 67d4ba9f76
closes: https://github.com/wez/wezterm/pull/6337
closes: https://github.com/wez/wezterm/issues/6336