processes() improved command parsing
This commit is contained in:
parent
a11719984f
commit
fdcf9c707e
@ -589,9 +589,13 @@ function processes(callback) {
|
|||||||
const p1 = fullcommand.indexOf('(');
|
const p1 = fullcommand.indexOf('(');
|
||||||
const p2 = fullcommand.indexOf(')');
|
const p2 = fullcommand.indexOf(')');
|
||||||
const p3 = fullcommand.indexOf('/');
|
const p3 = fullcommand.indexOf('/');
|
||||||
|
const p4 = fullcommand.indexOf(':');
|
||||||
if (p1 < p2 && p1 < p3 && p3 < p2) {
|
if (p1 < p2 && p1 < p3 && p3 < p2) {
|
||||||
command = fullcommand.split(' ')[0];
|
command = fullcommand.split(' ')[0];
|
||||||
command = command.replace(/:/g, '');
|
command = command.replace(/:/g, '');
|
||||||
|
} else {
|
||||||
|
if (p4 > 0) {
|
||||||
|
command = fullcommand.split(' ')[0];
|
||||||
} else {
|
} else {
|
||||||
// try to figure out where parameter starts
|
// try to figure out where parameter starts
|
||||||
let firstParamPos = fullcommand.indexOf(' -');
|
let firstParamPos = fullcommand.indexOf(' -');
|
||||||
@ -621,6 +625,7 @@ function processes(callback) {
|
|||||||
params = tmpParams.trim();
|
params = tmpParams.trim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user