Closed afbjorklund closed 1 year ago
A compromise, if wanting to keep the color override, would be to go for "lime green"
#C0FF00
(xterm-256color: GreenYellow # 154)#32CD32
(xterm-256color: PaleGreen3 # 77)It's not great on a light background, but you can at least make out the characters...
This makes it work also with the "light" themes, here showing base16-shell "default":
Two issues:
cmd/limactl/shell.go: if _, present := os.LookupEnv("COLORTERM"); present {
cmd/limactl/shell.go: sshArgs = append(sshArgs, "-o", "SendEnv=\"COLORTERM\"")
# accept any incoming COLORTERM environment variable
sed -i 's/^AcceptEnv LANG LC_\*$/AcceptEnv COLORTERM LANG LC_*/' /etc/ssh/sshd_config
After that:
Should the limactl shell
change the PS1, similar to what Singularity/Apptainer does ? (Docker/Podman does not)
Or should we rely on the user shell configuration to pick up the presence of SSH_CLIENT
, like Powerline does?
I guess we can just remove the custom PS1
I'm seeing lime green color everywhere, so think I will just keep it as it is now.
Description
We had an old issue, to make the
lima
prompt distinguishable from the host prompt.The color was playing on the "lime" word game, and used a bright yellow-green (Lime)
But it requires 24-bit color support to look best, as an addition to 256 (or 16) colors support:
https://github.com/lima-vm/lima/pull/433
https://github.com/lima-vm/lima/pull/435
COLORTERM=truecolor
And it doesn't really work on light backgrounds, so requires support for the terminal "theme":
https://github.com/lima-vm/lima/issues/485
https://github.com/lima-vm/lima/pull/486
TERMTHEME=Dark
So I think the best would be to remove those changes, and go back to the original issue:
Go back to the original Ubuntu prompt:
Note that the default prompt does have the host name in it, which does include "lima":
But it could be desired to change the prompt?
[ "$PS1" ] && PS1="[LIMA] $PS1"