@trenskow/arguments-parser 0.3.138 → 0.3.139

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.
@@ -288,7 +288,7 @@ const autocomplete = () => {
288
288
  if (variadic === 'allow' && !variadicOnly && current === Array(current.length).fill('-').join('')) {
289
289
  items = items.concat([{
290
290
  type: 'option',
291
- argument: '--'.slice(0, -current.length)
291
+ argument: current.length ? '--'.slice(0, -current.length) : '--'
292
292
  }]);
293
293
  }
294
294
 
@@ -298,11 +298,6 @@ const autocomplete = () => {
298
298
 
299
299
  };
300
300
 
301
- if (args.length === 0) {
302
- return output(
303
- await complete(-1));
304
- }
305
-
306
301
  for (idx = 0; idx < autocompleteIndex || idx < args.length; idx++) {
307
302
 
308
303
  if (!schemas[idx]) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trenskow/arguments-parser",
3
- "version": "0.3.138",
3
+ "version": "0.3.139",
4
4
  "description": "Yet another arguments parser.",
5
5
  "main": "index.js",
6
6
  "type": "module",