Permalink
Browse files

Give DefaultTabExpansion a more unique name to avoid conflicts (NuGet…

…, for example)
  • Loading branch information...
1 parent f7f2e38 commit af619d0881024cd6ca33a3982d66272e8465761b @dahlbyk committed Dec 17, 2010
Showing with 4 additions and 3 deletions.
  1. +4 −3 profile.example.ps1
View
@@ -22,8 +22,9 @@ function prompt {
return "> "
}
-if(-not (Test-Path Function:\DefaultTabExpansion)) {
- Rename-Item Function:\TabExpansion DefaultTabExpansion
+$teBackup = 'posh-git_DefaultTabExpansion'
+if(!(Test-Path Function:\$teBackup)) {
+ Rename-Item Function:\TabExpansion $teBackup
}
# Set up tab expansion and include git expansion
@@ -34,7 +35,7 @@ function TabExpansion($line, $lastWord) {
# Execute git tab completion for all git-related commands
'git (.*)' { GitTabExpansion $lastBlock }
# Fall back on existing tab expansion
- default { DefaultTabExpansion $line $lastWord }
+ default { & $teBackup $line $lastWord }
}
}

0 comments on commit af619d0

Please sign in to comment.