Open gsuuon opened 3 months ago
@gsuuon try adding cd ~ in your .bashrc or shell youre using by default
using config.default_cwd didnt work too, still a noob on configuring wezterm lol
Same here, launching the first window puts me in ~
(and if I change the home for my user in WSL it correctly reflects that), but any other new spawned pane always opens in /mnt/c/Users/<username>
Relevant part of my config for reference:
local use_wsl = true
if string.find(wezterm.target_triple, "windows") and use_wsl then
local wsl_domains = wezterm.default_wsl_domains()
c.wsl_domains = wsl_domains
if #wsl_domains > 0 then
local default_distro_name = "arch"
local found = false
for _, domain in ipairs(wsl_domains) do
if string.find(domain.name, default_distro_name) then
c.default_domain = domain.name
found = true
break
end
end
-- fallback to the first distro
if not found then
c.default_domain = wsl_domains[1].name
end
end
end
What Operating System(s) are you seeing this problem on?
Windows
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
wezterm 20240520-135708-b8f94c47
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
When default_cwd is an UNC path like
//wsl.localhost/Ubuntu-22.04/home/gsuuon
fromwslpath -am ~
and default_prog is wsl, the first time opening wezterm the cwd is set but the second attempt seems to strip the leading/
and error.To Reproduce
Configuration
Expected Behavior
Can open multiple tabs at default_cwd
Logs
Anything else?
This shell is not set to report OSC 7, though maybe it's pulling the path some other way?
I tried with a non-
~
path and see the same behavior. Also tried with///wsl.localhost..
and that errors the first time and fails to set cwd the second.I tried with
return { default_domains = 'WSL:Ubuntu-22.04' }
and that seems to have the same issue, where the first tab opens to~
within wsl and the second opens to/mnt/c/Users/gsuuon
(on Windows) but there's no error.