Skip to content

Commit 08c3a82

Browse files
authored
Merge pull request #2646 from carapace-sh/powershell-fix-trim
powershell: fix trimend
2 parents 7b7cc17 + 34ad375 commit 08c3a82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/carapace/cmd/lazyinit/powershell.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ func Powershell(completers []string) string {
1111
1212
$_carapace_lazy = {
1313
param($wordToComplete, $commandAst, $cursorPosition)
14-
$completer = $commandAst.CommandElements[0].Value.trimend(".exe")
14+
$completer = $commandAst.CommandElements[0].Value.Replace("\.exe$", "")
1515
carapace $completer powershell | Out-String | Invoke-Expression
1616
& (Get-Item "Function:_${completer}_completer") $wordToComplete $commandAst $cursorPosition
1717
}

0 commit comments

Comments
 (0)