Fixes default command parsing

This commit is contained in:
Roman Konoval
2026-02-18 09:22:30 +01:00
committed by Nicolas GB
parent 3d78c28f7e
commit d483544483
3 changed files with 57 additions and 11 deletions
+2 -1
View File
@@ -9,8 +9,9 @@ function M.parse_default_cmd(cmd_output)
return nil
end
-- Remove whitespace and parse TOML output
-- Remove whitespace and strip "key = " prefix from `jj config list` output
local trimmed_cmd = vim.trim(cmd_output)
trimmed_cmd = trimmed_cmd:gsub("^[%w._-]+ = ", "")
-- Try to parse as TOML array: ["item1", "item2", ...]
-- Pattern "%[(.*)%]" captures everything between square brackets