Check before attempting to load things

This commit is contained in:
Kenneth Benzie 2023-07-25 23:46:21 +01:00
parent b8976a84a8
commit 209010e90e

View File

@ -9,9 +9,13 @@ $GitPromptSettings.AfterStatus = ""
# Enable Chocolatey completions. # Enable Chocolatey completions.
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
# Enable op completions. # Enable op completions.
Import-Module "$env:LOCALAPPDATA\1Password\cli\opProfile.psm1" if (Test-Path "$env:LOCALAPPDATA\1Password\cli\opProfile.psm1") {
Import-Module "$env:LOCALAPPDATA\1Password\cli\opProfile.psm1"
}
# Enable gh completions. # Enable gh completions.
Invoke-Expression -Command $(gh completion -s powershell | Out-String) if (Get-Command "gh" -ErrorAction SilentlyContinue) {
Invoke-Expression -Command $(gh completion -s powershell | Out-String)
}
# Customize PowerShell prompt. # Customize PowerShell prompt.
function Prompt { function Prompt {