Skip to content

Commit

Permalink
Trim initial whitespace before matching for tab expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlbyk committed May 1, 2011
1 parent 86ec620 commit 70c6a00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion profile.example.ps1
Expand Up @@ -29,7 +29,7 @@ if(!(Test-Path Function:\$teBackup)) {

# Set up tab expansion and include git expansion
function TabExpansion($line, $lastWord) {
$lastBlock = [regex]::Split($line, '[|;]')[-1]
$lastBlock = [regex]::Split($line, '[|;]')[-1].TrimStart()
switch -regex ($lastBlock) {
# Execute git tab completion for all git-related commands
"$(Get-GitAliasPattern) (.*)" { GitTabExpansion $lastBlock }
Expand Down

0 comments on commit 70c6a00

Please sign in to comment.