Skip to content

Commit

Permalink
red: grep path fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hugeping committed Oct 1, 2023
1 parent 6674c61 commit 7fcf543
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions data/lib/red/proc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,10 @@ end

function proc.grep(w, rex)
if not rex then return end
local path = w:data() and w:data():path()
local path = w:data() and w:data():path() or
sys.dirname(w.frame:getfilename())
w = w:output('+grep')
w:run(function()
grep(sys.dirname(path or w.frame:getfilename()), rex, w)
end)
w:run(function() grep(path, rex, w) end)
end

--luacheck: push
Expand Down

0 comments on commit 7fcf543

Please sign in to comment.