Add commandLineParams to os.nim.

commandLineParams returns seq of arguments given to program on command line.
This commit is contained in:
Michał Zieliński
2013-12-09 21:45:42 +01:00
parent 642a0d5563
commit 8dae664159

View File

@@ -1481,6 +1481,12 @@ elif not defined(createNimRtl):
proc paramCount*(): int {.tags: [FReadIO].} = return cmdCount-1
when defined(paramCount):
proc commandLineParams*(): seq[TaintedString] =
result = @[]
for i in 1..paramCount():
result.add(paramStr(i))
when defined(linux) or defined(solaris) or defined(bsd) or defined(aix):
proc getApplAux(procPath: string): string =
result = newString(256)