diff --git a/src/ParseArgs.cpp b/src/ParseArgs.cpp index c858d0f..05dc4b1 100644 --- a/src/ParseArgs.cpp +++ b/src/ParseArgs.cpp @@ -5,12 +5,15 @@ CLArgs ParseArgs(int argc, char** argv) { CLArgs out; - out["_name"] = argv[0]; - for(int i = 0; i < argc; i++) + out["_nargs"] = MString(argc); + + out["_cmdline"] = out["_name"] = out["_arg0"] = argv[0]; + for(int i = 1; i < argc; i++) { MString carg = argv[i]; out["_arg" + MString(i)] = carg; bool namevalue = false; + out["_cmdline"] += " " + carg; for(size_t c = 0; c < carg.Len(); c++) if(carg[c] == '=')