We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d89d57d commit 009bba4Copy full SHA for 009bba4
clap_complete/src/env/shells.rs
@@ -286,8 +286,15 @@ Register-ArgumentCompleter -Native -CommandName {bin} -ScriptBlock {{
286
287
$prev = $env:{var};
288
$env:{var} = "powershell";
289
+
290
+ $args = $commandAst.Extent.Text
291
+ $args = $args.Substring(0, [math]::Min($cursorPosition, $args.Length));
292
+ if ($wordToComplete -eq "") {{
293
+ $args += " ''";
294
+ }}
295
296
$results = Invoke-Expression @"
-& {completer} -- $commandAst
297
+& {completer} -- $args
298
"@;
299
if ($null -eq $prev) {{
300
Remove-Item Env:\{var};
0 commit comments