Skip to content

Commit

Permalink
Merge pull request #743 from dahlbyk/rkeithhill/fix-expandparamvalues…
Browse files Browse the repository at this point in the history
…-scriptblock-invoke

Fix git restore scriptblock used by expandParamValues
  • Loading branch information
dahlbyk authored Mar 14, 2020
2 parents bce6e48 + 38e04fe commit f69efd9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/GitParamTabExpansion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ $gitParamValues = @{
conflict = 'merge diff3'
source = {
param($ref)
gitBranches $matches['ref'] $true
gitTags $matches['ref']
gitBranches $ref $true
gitTags $ref
}
}
revert = @{
Expand Down
2 changes: 1 addition & 1 deletion src/GitTabExpansion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ function script:expandParamValues($cmd, $param, $filter) {
$paramValues = $gitParamValues[$cmd][$param]

$completions = if ($paramValues -is [scriptblock]) {
& $paramValues $filter | Where-Object { $_ -like "$filter*" }
& $paramValues $filter
}
else {
$paramValues.Trim() -split ' ' | Where-Object { $_ -like "$filter*" } | Sort-Object
Expand Down

0 comments on commit f69efd9

Please sign in to comment.