feat: cmdline tab improvements

This commit is contained in:
Barrett Ruth 2026-03-28 12:18:33 -04:00
parent c677feee2f
commit 597788b447
No known key found for this signature in database
GPG key ID: A6C96C9349D2FC81
2 changed files with 14 additions and 52 deletions

View file

@ -382,11 +382,14 @@ local function complete(arglead, cmdline, _)
local flag, value_prefix = arglead:match('^(%-%-[^=]+)=(.*)$')
if flag and flag_values[flag] then
return vim.tbl_map(function(v)
return flag .. '=' .. v
end, vim.tbl_filter(function(v)
return v:find(value_prefix, 1, true) == 1
end, flag_values[flag]))
return vim.tbl_map(
function(v)
return flag .. '=' .. v
end,
vim.tbl_filter(function(v)
return v:find(value_prefix, 1, true) == 1
end, flag_values[flag])
)
end
if arg_idx == 1 then