From 34ad375e27fb62b76f412e272901ead9e8a94c99 Mon Sep 17 00:00:00 2001 From: rsteube Date: Tue, 17 Dec 2024 12:45:03 +0100 Subject: [PATCH] powershell: fix trimend --- cmd/carapace/cmd/lazyinit/powershell.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/carapace/cmd/lazyinit/powershell.go b/cmd/carapace/cmd/lazyinit/powershell.go index ea8750b50e..0170a5e464 100644 --- a/cmd/carapace/cmd/lazyinit/powershell.go +++ b/cmd/carapace/cmd/lazyinit/powershell.go @@ -11,7 +11,7 @@ func Powershell(completers []string) string { $_carapace_lazy = { param($wordToComplete, $commandAst, $cursorPosition) - $completer = $commandAst.CommandElements[0].Value.trimend(".exe") + $completer = $commandAst.CommandElements[0].Value.Replace("\.exe$", "") carapace $completer powershell | Out-String | Invoke-Expression & (Get-Item "Function:_${completer}_completer") $wordToComplete $commandAst $cursorPosition }