Powerlevel9k / powerlevel9k

Powerlevel9k was a tool for building a beautiful and highly functional CLI, customized for you. P9k had a substantial impact on CLI UX, and its legacy is now continued by P10k.
https://github.com/romkatv/powerlevel10k
MIT License
13.46k stars 948 forks source link

Format only being applied to local default user #1298

Open OddSquirrel opened 5 years ago

OddSquirrel commented 5 years ago

Hi everybody,

I just installed iTerm2, oh-my-zsh and powerlevel9k as well as a nerd font. So far, everything's working beautifully, except for the formatting, which only applies to the default user. Bit hard to explain, but as soon as I change my "persona" via switching to root or connect to another server via ssh the entire prompt formatting is gone. This is what it looks like:

2019-06-03_18-32-17

Does anybody have an idea what I may be doing wrong?

romkatv commented 5 years ago

sudo su doesn't load your ~/.zshrc. Use sudo zsh instead.

OddSquirrel commented 5 years ago

Thanks @romkatv! I wasn't aware of that, I thought sudo su is a thing, no matter what shell (like I wouldn't type sudo bash in bash if that makes sense). So it did indeed work and format my prompt. Unfortunately, all my ssh connection aliases no longer work that way. :(

romkatv commented 5 years ago

You can use sudo $SHELL as a shell-agnostic command.

OddSquirrel commented 5 years ago

That is great to know, thanks much!

Would you have an idea why it won't format my ssh prompt, though?

romkatv commented 5 years ago

Would you have an idea why it won't format my ssh prompt, though?

It should work as long as you have your theme installed on the remote machine to which you are connecting. Do you?

OddSquirrel commented 5 years ago

It should work as long as you have your theme installed on the remote machine to which you are connecting. Do you?

Well no, I mean I can't install all kinds of mods on other people's systems of course. Are you telling me my terminal needs another machine to serve prompt formatting back? If so, I'm completely lost now. I mean I'm literally telling my system that I'm SSHing into a remote machine and it can't work with that to change colors and backgrounds without the remote machine telling it the exact same thing? Seriously?

romkatv commented 5 years ago

I'm literally telling my system that I'm SSHing into a remote machine and it can't work with that to change colors and backgrounds without the remote machine telling it the exact same thing? Seriously?

Yes. Don't look at me, it wasn't my idea. Your terminal is a glorified teletypewriter (a.k.a. TTY). These things go back to the 19th century, with only cosmetic improvements since then.

OddSquirrel commented 5 years ago

Oh, no worries, you're not responsible. I almost fell off my chair, though. What a backwards way of doing things! As you already said, those terminals helped Columbus discovering the Americas, so we get to take it or leave it I reckon. Thanks again for your help!