Last active
May 11, 2022 06:11
-
-
Save nickcox/96cf48d21e19fad888b7d16e6e0b34e9 to your computer and use it in GitHub Desktop.
lazy load posh-git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lazy load posh-git | |
Register-ArgumentCompleter -Native -CommandName 'git' -ScriptBlock { | |
if (!(gmo posh-git)) { Expand-GitCommand ($args[1] -replace '^git\W*', '') } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment