diff options
author | Karl Berry <karl@freefriends.org> | 2020-03-05 00:48:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-03-05 00:48:46 +0000 |
commit | f210bce174e1f2f05305ab03e88e120a1cbfc4da (patch) | |
tree | 5c4e2ad096b5c745e859516ac3196fa0864292d5 /Master/texmf-dist/scripts/context/lua/mtx-grep.lua | |
parent | 35fd641a3546acc0c62e0aa7f134888e36da30d4 (diff) |
context (from cont-tmf.zip of Feb 17 16:00, size 116339406)
git-svn-id: svn://tug.org/texlive/trunk@54086 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/context/lua/mtx-grep.lua')
-rw-r--r-- | Master/texmf-dist/scripts/context/lua/mtx-grep.lua | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/Master/texmf-dist/scripts/context/lua/mtx-grep.lua b/Master/texmf-dist/scripts/context/lua/mtx-grep.lua index 9a4237737cf..e4a2a8d2f07 100644 --- a/Master/texmf-dist/scripts/context/lua/mtx-grep.lua +++ b/Master/texmf-dist/scripts/context/lua/mtx-grep.lua @@ -173,15 +173,17 @@ function scripts.grep.find(pattern, files, offset) local globbed = dir.glob(files[i]) for i=1,#globbed do name = globbed[i] - local data = io.loaddata(name) - if data then - n, m, noffiles = 0, 0, noffiles + 1 - lpegmatch(capture,data) - if count and m > 0 then - nofmatches = nofmatches + m - nofmatchedfiles = nofmatchedfiles + 1 - write_nl(format("%5i %s",m,name)) - io.flush() + if not find(name,"/%.") then + local data = io.loaddata(name) + if data then + n, m, noffiles = 0, 0, noffiles + 1 + lpegmatch(capture,data) + if count and m > 0 then + nofmatches = nofmatches + m + nofmatchedfiles = nofmatchedfiles + 1 + write_nl(format("%5i %s",m,name)) + io.flush() + end end end end |