From 83219f8522271ae4f278abc5687921cc8267bb33 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 31 Oct 2018 03:51:37 -0700 Subject: Bumped version number, fixed REPL, and simplified/fixed (use %). --- files.lua | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'files.lua') diff --git a/files.lua b/files.lua index c04f703..48e047f 100644 --- a/files.lua +++ b/files.lua @@ -191,20 +191,18 @@ Files.walk = function(path, flush_cache) end end end - local iter - iter = function(files, i) - if not (files) then - return - end - i = i + 1 - do - local f = files[i] - if f then - return i, f - end + files = files or { } + do + local _accum_0 = { } + local _len_0 = 1 + for _index_0 = 1, #files do + local f = files[_index_0] + _accum_0[_len_0] = gsub(f, "^%./", "") + _len_0 = _len_0 + 1 end + files = _accum_0 end - return iter, files, 0 + return ipairs(files) end local line_counter = re.compile([[ lines <- {| line (%nl line)* |} line <- {} (!%nl .)* -- cgit v1.2.3 From 307dea18815ba4a06a3098edb170d7ad90708815 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 2 Nov 2018 14:38:24 -0700 Subject: Changed stub convention to (foo 1 baz 2) -> foo_1_baz instead of foo_1_baz_2, removed "smext", made some cleanup changes. --- files.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'files.lua') diff --git a/files.lua b/files.lua index 48e047f..13679e3 100644 --- a/files.lua +++ b/files.lua @@ -181,6 +181,8 @@ Files.walk = function(path, flush_cache) files = { path } + elseif path:match("^[~/]") or path:match("^%./") or path:match("^%.%./") then + files = browse(path) else for nomsupath in package.nomsupath:gmatch("[^;]+") do do -- cgit v1.2.3