Closed andrerav closed 2 years ago
@andrerav unfortunately that's just kubectl being slow. What you can do is make use of parse_kubeconfig
to no longer do the kubectl call but let oh-my-posh parse the config manually.
Great, thank you very much for that tip. My solution ended up being a custom theme where I removed the kubectl segment entirely.
This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.
Code of Conduct
What happened?
I followed the steps outlined here to configure my prompt. My profile.ps1 looks like this:
The prompt looks nice and works as expected. However, after running any arbitrary command (including very simple things like echo) it takes a noticably long time before the prompt returns (about 0.2-1 seconds it seems, but it varies).
Based on the output from Write-PoshDebug it seems that the command
kubectl
is the culprit. If I remove kubectl from PATH the problem goes away.Theme
The result is the same with most themes, it seems.
What OS are you seeing the problem on?
Windows
Which shell are you using?
powershell
Log output