ray-x / go.nvim

G'day Nvimer, Joyful Gopher: Discover the Feature-Rich Go Plugin for Neovim
MIT License
2.05k stars 123 forks source link

`GoTestFunc` is broken on fish shell after updating to latest version #428

Open rvdwijngaard opened 7 months ago

rvdwijngaard commented 7 months ago

After updating go.nvim to the latest version the GoTestFunc command is broken. If I try to run it I get the following error:

   Warn  08:06:13 AM notify.warn go test ./iot/event-converter/mqtt -run="^\QTestConvertRecord\E$" exited with code: 127 error lines: { "fish: Expected a variable name after this $.", 'go test ./iot/event-converter/mqtt -run="^\\QTestConvertRecord\\E$"', "                                                               ^" } go test failed failed

I think the double quotes have to be replaced by single quotes:

local function format_test_name(name)
  name = name:gsub('"', '')

  return string.format([['^\Q%s\E$']], name)
end