@optique/core 0.7.13-dev.361 → 0.7.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/facade.cjs +3 -3
- package/dist/facade.js +3 -3
- package/package.json +1 -1
package/dist/facade.cjs
CHANGED
|
@@ -470,9 +470,9 @@ function run(parser, programName, args, options = {}) {
|
|
|
470
470
|
} else {
|
|
471
471
|
const singularMatchExact = completionName === "singular" || completionName === "both" ? arg === "--completion" : false;
|
|
472
472
|
const pluralMatchExact = completionName === "plural" || completionName === "both" ? arg === "--completions" : false;
|
|
473
|
-
if (
|
|
474
|
-
const shell = args[i + 1];
|
|
475
|
-
const completionArgs = args.slice(i + 2);
|
|
473
|
+
if (singularMatchExact || pluralMatchExact) {
|
|
474
|
+
const shell = i + 1 < args.length ? args[i + 1] : "";
|
|
475
|
+
const completionArgs = i + 1 < args.length ? args.slice(i + 2) : [];
|
|
476
476
|
return handleCompletion([shell, ...completionArgs], programName, parser, completionParsers.completionCommand, stdout, stderr, onCompletion, onError, availableShells, colors, maxWidth, completionMode, completionName);
|
|
477
477
|
}
|
|
478
478
|
}
|
package/dist/facade.js
CHANGED
|
@@ -470,9 +470,9 @@ function run(parser, programName, args, options = {}) {
|
|
|
470
470
|
} else {
|
|
471
471
|
const singularMatchExact = completionName === "singular" || completionName === "both" ? arg === "--completion" : false;
|
|
472
472
|
const pluralMatchExact = completionName === "plural" || completionName === "both" ? arg === "--completions" : false;
|
|
473
|
-
if (
|
|
474
|
-
const shell = args[i + 1];
|
|
475
|
-
const completionArgs = args.slice(i + 2);
|
|
473
|
+
if (singularMatchExact || pluralMatchExact) {
|
|
474
|
+
const shell = i + 1 < args.length ? args[i + 1] : "";
|
|
475
|
+
const completionArgs = i + 1 < args.length ? args.slice(i + 2) : [];
|
|
476
476
|
return handleCompletion([shell, ...completionArgs], programName, parser, completionParsers.completionCommand, stdout, stderr, onCompletion, onError, availableShells, colors, maxWidth, completionMode, completionName);
|
|
477
477
|
}
|
|
478
478
|
}
|