docs: dot-source kubectl completion script in PowerShell profile

This commit is contained in:
Thomas Hein
2025-10-18 04:15:34 -05:00
parent b067e45290
commit 0f6bc57d11

View File

@@ -103,7 +103,7 @@ var (
# Set kubectl completion code for powershell to run on startup
## Save completion code to a script and execute in the profile
kubectl completion powershell > $HOME\.kube\completion.ps1
Add-Content $PROFILE "$HOME\.kube\completion.ps1"
Add-Content $PROFILE ". $HOME\.kube\completion.ps1"
## Execute completion code in the profile
Add-Content $PROFILE "if (Get-Command kubectl -ErrorAction SilentlyContinue) {
kubectl completion powershell | Out-String | Invoke-Expression