Skip to content

Commit c7f084e

Browse files
authored
Merge pull request #805 from wallybh/plus-sign
Fix tab completion of branches in different worktrees
2 parents 4bb8d81 + 00f18c9 commit c7f084e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/GitTabExpansion.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ function script:gitBranches($filter, $includeHEAD = $false, $prefix = '') {
135135
$filter = $matches['to']
136136
}
137137

138-
$branches = @(git branch --no-color | ForEach-Object { if (($_ -notmatch "^\* \(HEAD detached .+\)$") -and ($_ -match "^\*?\s*(?<ref>.*)")) { $matches['ref'] } }) +
138+
$branches = @(git branch --no-color | ForEach-Object { if (($_ -notmatch "^\* \(HEAD detached .+\)$") -and ($_ -match "^[\*\+]?\s*(?<ref>.*)")) { $matches['ref'] } }) +
139139
@(git branch --no-color -r | ForEach-Object { if ($_ -match "^ (?<ref>\S+)(?: -> .+)?") { $matches['ref'] } }) +
140140
@(if ($includeHEAD) { 'HEAD','FETCH_HEAD','ORIG_HEAD','MERGE_HEAD' })
141141

0 commit comments

Comments
 (0)