Can starship change prompt depending on typed command? #4690
Replies: 1 comment
-
I have the same thing in powerlevel10k and I find it really awesome and the lack of this feature in starship really is a deal-breaker for me. I posted an issue and started working on a pull request on this topic. But I don't think It would be possible to port this functionality over to starship or at least as good as it is on powerlevel10k. P10k performs alias expansion and embeds a zsh parser to deduce which commands are present in the command line so that:
I don't think It would be a good idea to have a parser for each supported shell, so we would have to strike a compromise: The OhMyPosh project has opted for a simpler version:
I am curious to have the opinion of someone else on this topic. |
Beta Was this translation helpful? Give feedback.
-
Like in oh-my-zsh my default prompt looks like this:
![image](https://user-images.githubusercontent.com/35669512/205968969-a957fca5-d9ac-4a9b-a20e-833ab0168d31.png)
![image](https://user-images.githubusercontent.com/35669512/205969136-74da89c8-7f71-46cf-8596-c5a7c219978e.png)
But when I type
kubctl
, then it shows kubernetes context:Is the same behaviour achievable somehow in starship?
Beta Was this translation helpful? Give feedback.
All reactions