-
Notifications
You must be signed in to change notification settings - Fork 661
Don't set the prompt color when running in light terminal theme #485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I haven't had any issues with colors from I am using base16-shell for terminal colors and most importantly all the lima colors honor the colors from base16-shell. I spot checked a few of the base16-shell color themes on a couple of terminals on Linux and the all have readable text for both limactl output and the interactive prompts. |
Thank you for the feedback, and this was when running in a "light" theme with a white or light yellow/gray background? |
I actually checked all the base16 themes and as expected, color text is always perfectly readable. Which is actually a property of base16-shell I think a better measure would be to test with the default color settings of some major macOS and Linux desktop terminal emulators. |
I don't really know what "base16-shell" is, but I guess it is https://github.com/chriskempson/base16-shell ? As mentioned in the other older issues, I only tested with the Ubuntu terminal so don't know about others... The main goal was to separate the two prompts (beyond the host). |
I tried out a few themes, and I am not sure I agree... I would say that the default prompt has some issues? So we should either change the color, or revert to the original. Perhaps just use something else... |
Oh! I was testing a different prompt! I tested the limactl interactive prompts (i.e. I didn't actually bother about the shell prompts inside the VM. (My personal use of lima shell is non-interactive. i..e I don't enter an interactive |
That's exactly what I'm thinking. |
Cycling through all the base16 color schemes. The light green color is indeed bad. It's not visible against a light background. Something is wrong there with the username and hostname part of the shell prompt. I do remember this light green being a default Ubuntu shell prompt color in the past. I haven't used an Ubuntu desktop in a while. So I'm not sure what the default shell prompt colors are today. I have also checked the Ubuntu ubuntushell.webm |
Ah. I see now. The change of the Ubuntu prompt was deliberate ... Hmm. Yeah. Not sure about that. Seems like opening up a can of worms. |
The new "dark cyan" color would have worked with the new color scheme, but I think I will drop the "bright green" color.
It required extra code to export the
Then it will fall back to using the usual The Alpine image didn't use any color prompt (at all) anyway, unless you enable And otherwise it was only the "default" instance that got the override, if you started "ubuntu" it was still green. |
Yeah. I was wondering about the original implementation of the color change. The way I understand it, the change of the Ubuntu bash prompt color was specifically for one single use case:
I'm not sure how widespread this particular Ubuntu-on-Ubuntu use case even is? Obviously you are using Ubuntu-on-Ubuntu yourself, so it's a pretty important use case. The part that I still don't understand is why color is required as a concept at all. If we take just the title of the of the original issue #427
Then I think there is probably nothing that would need to be done, because in most cases, the hostname of the Lima VM will already be part of the PS1 shell prompt. And if I understand it correctly, the hostname always begins with So, wouldn't the shell prompt already be distinguishable by default? |
I think it is a good thing that Lima allows running also on developer (Linux) machines, but in this case it is only relevant in the context of the default terminal colors on the host. Other projects like Docker Machine or Podman Machine took years, before they "allow" running it on something other than Mac and Windows? Even if you actually wanted to, that is. In the original implementation, I was not using the default theme on my Ubuntu machine anyway (mostly used that for screenshots), so it already looked different from the host terminal.
It is not required, it was one way of making the "Maybe we should change the color of $PS1 by default" (#427 (comment)) So that's what I did, and now "ubuntu-lima" (i.e. "default") is different. It seemed like a good idea at the time, but as said there are other options... The prompt is no longer "bright green", so I think this issue is closed: I opened a new issue for the discussion of the lima color prompt: |
100% agreed. What I was not sure about was the current "market share" of Ubuntu amongst developer desktops, compared to e.g. popOS, Fedora, Manjaro, etc... From my highly anecdotal experience, Ubuntu actually DOES still hold the majority of the "market share" in the Linux Developer space. |
Uh oh!
There was an error while loading. Please reload this page.
As noted in #427 (comment), there are some usability issues with lime-on-white.
It should also be possible to opt out of it (color), even for the default instance.
Use a better library, than the proposed port:
https://github.com/muesli/termenv
$PS1
distinguishable from the host shell #427The text was updated successfully, but these errors were encountered: