Skip to content

Instantly share code, notes, and snippets.

@nickcox
Last active May 11, 2022 06:11
Show Gist options
  • Save nickcox/96cf48d21e19fad888b7d16e6e0b34e9 to your computer and use it in GitHub Desktop.
Save nickcox/96cf48d21e19fad888b7d16e6e0b34e9 to your computer and use it in GitHub Desktop.
lazy load posh-git
# 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