Made separate versions of (sh> ...) and (=sh ...) for versions that

care or don't care about the output.
This commit is contained in:
Bruce Hill 2019-01-08 16:34:41 -08:00
parent d62631fb50
commit fc1655e028

View File

@ -17,7 +17,7 @@ externally (nomsu files for $path) means:
if $files: if $files:
return $files return $files
externally (sh> $cmd) means: externally (=sh $cmd) means:
lua> (" lua> ("
local result = io.popen(\$cmd) local result = io.popen(\$cmd)
local contents = result:read("*a") local contents = result:read("*a")
@ -25,10 +25,12 @@ externally (sh> $cmd) means:
return contents return contents
") ")
external $(sh> $) = $os.execute
test: test:
read file "lib/os.nom" read file "lib/os.nom"
externally (read file $filename) means (=lua "Files.read(\$filename)") externally (read file $filename) means (=lua "Files.read(\$filename, true)")
externally [ externally [
write to file $filename $text, to file $filename write $text write to file $filename $text, to file $filename write $text
write $text to file $filename write $text to file $filename