@optique/core 0.7.13-dev.361 → 0.7.13-dev.362

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 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 ((singularMatchExact || pluralMatchExact) && i + 1 < args.length) {
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 ((singularMatchExact || pluralMatchExact) && i + 1 < args.length) {
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/core",
3
- "version": "0.7.13-dev.361+10f5601c",
3
+ "version": "0.7.13-dev.362+3749a294",
4
4
  "description": "Type-safe combinatorial command-line interface parser",
5
5
  "keywords": [
6
6
  "CLI",