Skip to content

Commit

Permalink
Merge pull request #119 from rsteube/powershell-fix-empty-wordtocomplete
Browse files Browse the repository at this point in the history
powershell: fix empty argument passed to command
  • Loading branch information
rsteube authored Nov 20, 2020
2 parents 981c67a + 614a71d commit d3c308d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion example/cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ $_example_completer = {
Function _example_callback {
param($uid)
if (!$wordToComplete) {
example _carapace powershell "$uid" $($commandElements| Foreach {$_.Extent}) '' | Out-String | Invoke-Expression
example _carapace powershell "$uid" $($commandElements| Foreach {$_.Extent}) '""' | Out-String | Invoke-Expression
} else {
example _carapace powershell "$uid" $($commandElements| Foreach {$_.Extent}) | Out-String | Invoke-Expression
}
Expand Down
2 changes: 1 addition & 1 deletion powershell/snippet.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ $_%v_completer = {
Function _%v_callback {
param($uid)
if (!$wordToComplete) {
%v _carapace powershell "$uid" $($commandElements| Foreach {$_.Extent}) '' | Out-String | Invoke-Expression
%v _carapace powershell "$uid" $($commandElements| Foreach {$_.Extent}) '""' | Out-String | Invoke-Expression
} else {
%v _carapace powershell "$uid" $($commandElements| Foreach {$_.Extent}) | Out-String | Invoke-Expression
}
Expand Down

0 comments on commit d3c308d

Please sign in to comment.