WindowsPowerShell/completion.ps1

26 lines
1014 B
PowerShell

# Enable Git completions & prompt.
Import-Module Posh-Git
$GitPromptSettings.EnableFileStatus = $false
$GitPromptSettings.DefaultPromptPath = ""
$GitPromptSettings.DefaultPromptPrefix.Text = ""
$GitPromptSettings.DefaultPromptSuffix.Text = ""
$GitPromptSettings.BeforeStatus = ""
$GitPromptSettings.AfterStatus = ""
# Enable Scoop completions.
if (Get-Command scoop.ps1 -ErrorAction SilentlyContinue) {
$ScoopCompletion = "$($(Get-Item $(Get-Command scoop.ps1).Path).Directory.Parent.FullName)\modules\scoop-completion"
if (Test-Path $ScoopCompletion) {
Import-Module $ScoopCompletion
}
}
# Enable Chocolatey completions.
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
# Enable op completions.
if (Test-Path "$env:LOCALAPPDATA\1Password\cli\opProfile.psm1") {
Import-Module "$env:LOCALAPPDATA\1Password\cli\opProfile.psm1"
}
# Enable gh completions.
if (Get-Command "gh" -ErrorAction SilentlyContinue) {
Invoke-Expression -Command $(gh completion -s powershell | Out-String)
}