Skip to content

Commit 0903fc7

Browse files
committed
feat(docs): Crear archivo optional-kubectl-configs-pwsh.md
1 parent 0cd5a46 commit 0903fc7

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: "Autocompletado de PowerShell"
3+
description: "Algunas configuraciones opcionales para el autocompletado de PowerShell."
4+
headless: true
5+
_build:
6+
list: never
7+
render: never
8+
publishResources: false
9+
---
10+
11+
El script de autocompletado de kubectl para PowerShell se puede generar con el comando `kubectl completion powershell`.
12+
13+
Para hacerlo en todas tus sesiones de shell, agrega la siguiente línea a tu archivo `$PROFILE`:
14+
15+
```powershell
16+
kubectl completion powershell | Out-String | Invoke-Expression
17+
```
18+
Este commando agragará el script de autocompletado en cada sesión de PowerShell. También puedes añadir el script generado directamente en tu archivo `$PROFILE`.
19+
20+
Para agregar el escript generado a tu archivo `$PROFILE`, ejecuta el siguiente comando en el prompt de tu powershell
21+
22+
```powershell
23+
kubectl completion powershell >> $PROFILE
24+
```
25+
26+
Después de recargar tu shell, el autocompletado de kubectl debería funcionar.

0 commit comments

Comments
 (0)