Config/PowerShell_profile.ps1
# ----------------------------------- # Chocolatey profile $ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" if (Test-Path($ChocolateyProfile)) { Import-Module "$ChocolateyProfile" } # ----------------------------------- Register-ArgumentCompleter -Native -CommandName winget -ScriptBlock { param($wordToComplete, $commandAst, $cursorPosition) [Console]::InputEncoding = [Console]::OutputEncoding = $OutputEncoding = [System.Text.Utf8Encoding]::new() $Local:word = $wordToComplete.Replace('"', '""') $Local:ast = $commandAst.ToString().Replace('"', '""') winget complete --word="$Local:word" --commandline "$Local:ast" --position $cursorPosition | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) } } if (Test-Path "$($env:ProgramFiles)\GitHub CLI\gh.exe") { Invoke-Expression -Command $(gh completion -s powershell | Out-String) } # ----------------------------------- $JaapsTools = "$($env:USERPROFILE)\git\JaapsTools\JaapsTools.psd1" if (Test-Path $JaapsTools) { Import-Module $JaapsTools -Force } if (Get-Command -Name Startup -ea 0) { Startup } # ----------------------------------- if (Get-Module posh-git -ListAvailable) { Import-Module posh-git $GitPromptSettings.WindowTitle = $false # $GitPromptSettings.DefaultPromptPath.Text = "PS $(Get-PromptPath)" } # ----------------------------------- if (Get-Module DockerCompletion -ListAvailable) { Import-Module DockerCompletion } |