Nimscript: documented; 'exec' now produces output immediately
This commit is contained in:
parent
adf34082f0
commit
a480bebfce
2 changed files with 102 additions and 30 deletions
|
|
@ -13,7 +13,7 @@
|
|||
import
|
||||
ast, modules, passes, passaux, condsyms,
|
||||
options, nimconf, lists, sem, semdata, llstream, vm, vmdef, commands, msgs,
|
||||
os, times
|
||||
os, times, osproc
|
||||
|
||||
# we support 'cmpIgnoreStyle' natively for efficiency:
|
||||
from strutils import cmpIgnoreStyle
|
||||
|
|
@ -73,6 +73,9 @@ proc setupVM*(module: PSym; scriptName: string): PEvalContext =
|
|||
cbos getLastModificationTime:
|
||||
setResult(a, toSeconds(getLastModificationTime(getString(a, 0))))
|
||||
|
||||
cbos rawExec:
|
||||
setResult(a, osproc.execCmd getString(a, 0))
|
||||
|
||||
cbconf getEnv:
|
||||
setResult(a, os.getEnv(a.getString 0))
|
||||
cbconf existsEnv:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue