diff --git a/install.ps1 b/install.ps1 index ebc08bb..bc78885 100644 --- a/install.ps1 +++ b/install.ps1 @@ -1,3 +1,11 @@ +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)) { + scoop bucket add extras + scoop install scoop-completion + } +} + if (!(Test-Path -PathType Container $env:LOCALAPPDATA\layouts)) { New-Item -ItemType Directory -Path $env:LOCALAPPDATA\layouts Write-Output "changed: created directory $env:LOCALAPPDATA\layouts" diff --git a/profile.ps1 b/profile.ps1 index cf1e01f..f5a5a80 100644 --- a/profile.ps1 +++ b/profile.ps1 @@ -8,7 +8,10 @@ $GitPromptSettings.BeforeStatus = "" $GitPromptSettings.AfterStatus = "" # Enable Scoop completions. if (Get-Command scoop.ps1 -ErrorAction SilentlyContinue) { - Import-Module "$($(Get-Item $(Get-Command scoop.ps1).Path).Directory.Parent.FullName)\modules\scoop-completion" + $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"