refactor(wezterm): remove uneeded cwd_uri check
This commit is contained in:
parent
9a9bae1333
commit
d77258f849
@ -74,18 +74,6 @@ wezterm.on("update-right-status", function(window, pane)
|
||||
cwd = cwd_uri.file_path
|
||||
---@diagnostic disable-next-line: undefined-field
|
||||
hostname = cwd_uri.host or wezterm.hostname()
|
||||
else
|
||||
-- an older version of wezterm, 20230712-072601-f4abf8fd or earlier,
|
||||
-- which doesn't have the Url object
|
||||
cwd_uri = cwd_uri:sub(8)
|
||||
local slash = cwd_uri:find("/")
|
||||
if slash then
|
||||
hostname = cwd_uri:sub(1, slash - 1)
|
||||
-- and extract the cwd from the uri, decoding %-encoding
|
||||
cwd = cwd_uri:sub(slash):gsub("%%(%x%x)", function(hex)
|
||||
return string.char(tonumber(hex, 16))
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
cwd = " " .. cwd
|
||||
|
Loading…
Reference in New Issue
Block a user