spaceship-prompt / spaceship-prompt

:rocket::star: Minimalistic, powerful and extremely customizable Zsh prompt
https://spaceship-prompt.sh
MIT License
19.5k stars 959 forks source link

Kubernetes icon shows up as emoji image rather than nerd-font glyph by default #702

Open strangemonad opened 5 years ago

strangemonad commented 5 years ago

Is your feature request related to a problem? Please describe.

macos - iterm

After installing, by default, kubernetes status shows ☸️. This was very confusing because I had nerd-font installed and configured and really couldn't figure out why I wasn't getting a nicer glyph.

Describe the solution you'd like

I finally came across a solution with how kube-ps1 handles this via a "use image" flag that toggles between $'\u2388 ' and $'\xE2\x8E\x88 '

https://github.com/jonmosco/kube-ps1/blob/master/kube-ps1.sh

Describe alternatives you've considered

Yes, I know I can just configure SPACESHIP_KUBECONTEXT_SYMBOL=$'\u23881 but the default purple emoji rectangle on macos is ugly and not keeping with the minimal theme. It's also really hard to figure out

1) what the unicode code point for the dharma wheel is in nerd-font 2) why you can't just copy paste that unicode character but need to use $'\u2388 '

maximbaz commented 5 years ago

We use emoji fonts in almost every section, kubernetes section is not special 🙂

Emoji fonts are more common and have a nice feature of being part of Unicode standard, so an icon is guaranteed to be more or less similar on all fonts on all platforms (which isn't the case for Nerd font).

You can certainly copy-paste the unicode character directly, try:

SPACESHIP_KUBECONTEXT_SYMBOL='⎈'