Skip to content

Instantly share code, notes, and snippets.

@chriskyfung
Last active February 7, 2024 06:45
Show Gist options
  • Save chriskyfung/57b3b8547b54941416f08ed07f5fd03c to your computer and use it in GitHub Desktop.
Save chriskyfung/57b3b8547b54941416f08ed07f5fd03c to your computer and use it in GitHub Desktop.
My PowerShell Profile
# Import the posh-git module that provides Git integration, including autocomplete functionality
# See http://dahlbyk.github.io/posh-git/ for details.
Import-Module posh-git
# Generate the autocompletion script for GitHub CLI
# See https://cli.github.com/manual/gh_completion for details.
Invoke-Expression -Command $(gh completion -s powershell | Out-String)
# Generate the autocompletion script for Hugo CLI
# See https://gohugo.io/commands/hugo_completion_powershell/ for details.
hugo completion powershell | Out-String | Invoke-Expression
# Import the Chocolatey Profile that contains the necessary code to enable tab-completions to function for `choco`.
# Be aware that if you are missing these lines from your profile, tab completion for `choco` will not function.
# See https://ch0.co/tab-completion for details.
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
Import-Module "$ChocolateyProfile"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment