Skip to content

Commit

Permalink
fix: live_grep additional_args parsing (#2306)
Browse files Browse the repository at this point in the history
  • Loading branch information
Conni2461 committed Jan 6, 2023
1 parent b24fdfd commit 18fc02b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lua/telescope/builtin/__files.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,16 @@ local opts_contain_invert = function(args)
end

if #v >= 2 and v:sub(1, 1) == "-" and v:sub(2, 2) ~= "-" then
local non_option = false
for i = 2, #v do
local vi = v:sub(i, i)
if vi == "=" then -- ignore option -g=xxx
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
elseif vi == "l" then
elseif non_option == false and vi == "l" then
files_with_matches = true
end
end
Expand Down

0 comments on commit 18fc02b

Please sign in to comment.