diff --git a/wezterm.lua b/wezterm.lua index 7a97206..defbb9d 100644 --- a/wezterm.lua +++ b/wezterm.lua @@ -268,7 +268,12 @@ local function append_ssh_domain(window, pane, name, remote_address, username) return end - local entry = string.format('\t{\n\t\tname = %q,\n\t\tremote_address = %q,\n\t\tusername = %q,\n\t},\n', name, remote_address, username) + local entry = string.format( + '\t{\n\t\tname = %q,\n\t\tremote_address = %q,\n\t\tusername = %q,\n\t\tmultiplexing = "None",\n\t},\n', + name, + remote_address, + username + ) local updated, count = text:gsub("\n}%s*\n\n%-%- Unix domain", "\n" .. entry .. "}\n\n-- Unix domain", 1) if count == 0 then @@ -294,8 +299,13 @@ local function update_ssh_domain(window, pane, old_name, name, remote_address, u end local quoted_old_name = escape_pattern(string.format("%q", old_name)) - local pattern = "\t{\n\t\tname = " .. quoted_old_name .. ",\n\t\tremote_address = %b\"\",\n\t\tusername = %b\"\",\n\t},\n" - local entry = string.format('\t{\n\t\tname = %q,\n\t\tremote_address = %q,\n\t\tusername = %q,\n\t},\n', name, remote_address, username) + local pattern = "\t{\n\t\tname = " .. quoted_old_name .. ",\n.-\n\t},\n" + local entry = string.format( + '\t{\n\t\tname = %q,\n\t\tremote_address = %q,\n\t\tusername = %q,\n\t\tmultiplexing = "None",\n\t},\n', + name, + remote_address, + username + ) local safe_entry = entry:gsub("%%", "%%%%") local updated, count = text:gsub(pattern, safe_entry, 1)