refactor(wezterm): remove uneeded cwd_uri check

This commit is contained in:
Price Hiller 2023-08-31 22:03:00 -05:00
parent 9a9bae1333
commit d77258f849
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8

View File

@ -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