use "core" action [path of Nomsu file %filename] lua> ".." for f in files.walk(\%filename) do return f end barf "Could not find file: \%filename" action [sh> %cmd] lua> ".." local result = io.popen(\%cmd) local contents = result:read("*a") result:close() return contents action [read file %filename] =lua "files.read(\%filename)" compile [for file %f in %path %body] to Lua ".." for \(%f as lua expr) in files.walk(\(%path as lua expr)) do \(%body as lua statements) \(compile as: === next %f ===) end \(compile as: === stop %f ===) action [write to file %filename %text, to file %filename write %text] lua> ".." local file = io.open(\%filename, 'w') file:write(\%text) file:close() action [line number of %pos in %str] =lua "files.get_line_number(\%str, \%pos)" action [line %line_num in %str] =lua "files.get_line(\%str, \%line_num)"