using unix convention for cmd args

This commit is contained in:
minjaesong
2023-05-10 09:41:43 +09:00
parent beecc0b5eb
commit ba5c87530f
16 changed files with 34 additions and 34 deletions

View File

@@ -460,21 +460,21 @@ _G.shell = shell;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if (exec_args[1] !== undefined) {
// only meaningful switches would be either /c or /k anyway
// only meaningful switches would be either -c or -k anyway
var firstSwitch = exec_args[1].toLowerCase();
// command /c <commands>
// command -c <commands>
// ^[0] ^[1] ^[2]
if ("/c" == firstSwitch) {
if ("-c" == firstSwitch) {
if ("" == exec_args[2]) return 0; // no commands were given, just exit successfully
return shell.execute(exec_args[2]);
}
else if ("/k" == firstSwitch) {
else if ("-k" == firstSwitch) {
if ("" == exec_args[2]) return 0; // no commands were given, just exit successfully
shell.execute(exec_args[2]);
goInteractive = true;
}
else if ("/fancy" == firstSwitch) {
else if ("-fancy" == firstSwitch) {
graphics.setBackground(2,3,4);
goFancy = true;
goInteractive = true;