@clerc/plugin-completions
Advanced tools
Comparing version 0.42.0 to 0.42.1
@@ -8,4 +8,4 @@ import { definePlugin } from '@clerc/core'; | ||
;;`; | ||
function getBashCompletion(context) { | ||
const { cli } = context; | ||
function getBashCompletion(ctx) { | ||
const { cli } = ctx; | ||
const { _scriptName: name, _commands: commands } = cli; | ||
@@ -55,4 +55,4 @@ return `_${name}() { | ||
}; | ||
function getPwshCompletion(context) { | ||
const { cli } = context; | ||
function getPwshCompletion(ctx) { | ||
const { cli } = ctx; | ||
const { _scriptName: name, _commands: commands } = cli; | ||
@@ -114,3 +114,3 @@ return `using namespace System.Management.Automation | ||
parameters: ["[shell]"] | ||
}).on("completions", (context) => { | ||
}).on("completions", (ctx) => { | ||
var _a; | ||
@@ -120,5 +120,3 @@ if (!cli._scriptName) { | ||
} | ||
const shell = String( | ||
(_a = context.parameters.shell) != null ? _a : context.flags.shell | ||
); | ||
const shell = String((_a = ctx.parameters.shell) != null ? _a : ctx.flags.shell); | ||
if (!shell) { | ||
@@ -129,3 +127,3 @@ throw new Error("Missing shell name"); | ||
process.stdout.write( | ||
completionMap[shell](context) | ||
completionMap[shell](ctx) | ||
); | ||
@@ -132,0 +130,0 @@ } else { |
{ | ||
"name": "@clerc/plugin-completions", | ||
"version": "0.42.0", | ||
"version": "0.42.1", | ||
"author": "Ray <i@mk1.io> (https://github.com/so1ve)", | ||
@@ -51,3 +51,3 @@ "type": "module", | ||
"dependencies": { | ||
"@clerc/utils": "0.42.0" | ||
"@clerc/utils": "0.42.1" | ||
}, | ||
@@ -54,0 +54,0 @@ "peerDependencies": { |
7429
130
+ Added@clerc/utils@0.42.1(transitive)
- Removed@clerc/utils@0.42.0(transitive)
Updated@clerc/utils@0.42.1