From 70c6a00985423bafd8655262b395803260804cea Mon Sep 17 00:00:00 2001 From: Keith Dahlby Date: Sun, 1 May 2011 16:12:28 -0500 Subject: [PATCH] Trim initial whitespace before matching for tab expansion --- profile.example.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profile.example.ps1 b/profile.example.ps1 index da522b743..3b1e62fec 100644 --- a/profile.example.ps1 +++ b/profile.example.ps1 @@ -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 }