fix: live_grep additional_args parsing (#2306)
This commit is contained in:
@@ -71,13 +71,16 @@ local opts_contain_invert = function(args)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if #v >= 2 and v:sub(1, 1) == "-" and v:sub(2, 2) ~= "-" then
|
if #v >= 2 and v:sub(1, 1) == "-" and v:sub(2, 2) ~= "-" then
|
||||||
|
local non_option = false
|
||||||
for i = 2, #v do
|
for i = 2, #v do
|
||||||
local vi = v:sub(i, i)
|
local vi = v:sub(i, i)
|
||||||
if vi == "=" then -- ignore option -g=xxx
|
if vi == "=" then -- ignore option -g=xxx
|
||||||
break
|
break
|
||||||
elseif vi == "v" then
|
elseif vi == "g" or vi == "f" or vi == "m" or vi == "e" or vi == "r" or vi == "t" or vi == "T" then
|
||||||
|
non_option = true
|
||||||
|
elseif non_option == false and vi == "v" then
|
||||||
invert = true
|
invert = true
|
||||||
elseif vi == "l" then
|
elseif non_option == false and vi == "l" then
|
||||||
files_with_matches = true
|
files_with_matches = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user