Commit 85827b5
mpr
feat: add option to hide kube-ps1 when no context is set
- Introduces `KUBE_PS1_HIDE_IF_NOCONTEXT` (default: false) to hide the kube-ps1 prompt part when no context is set
- Updates `kube_ps1()` to check if the current context is set to "N/A" and hide the kube-ps1 prompt part if the option is enabled.
docs: add KUBE_PS1_HIDE_IF_NOCONTEXT to README
- Updates README to document the `KUBE_PS1_HIDE_IF_NOCONTEXT` option.1 parent b2286b6 commit 85827b5
2 files changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
200 | 201 | | |
201 | 202 | | |
202 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
376 | 378 | | |
377 | 379 | | |
378 | 380 | | |
| 381 | + | |
| 382 | + | |
379 | 383 | | |
380 | 384 | | |
381 | 385 | | |
| |||
0 commit comments