Skip to content
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

terminal not supported error with zsh and alpine #615

Closed
azmeuk opened this issue Jul 9, 2020 · 5 comments
Closed

terminal not supported error with zsh and alpine #615

azmeuk opened this issue Jul 9, 2020 · 5 comments
Labels
Milestone

Comments

@azmeuk
Copy link

azmeuk commented Jul 9, 2020

Shell: zsh 5.8

Operating system: Alpine linux 3.8

Liquidprompt version: v1.12-rc.1

Steps to Reproduce

  1. Open a SSH connection to a ZSH shell with liquidprompt on a Alpine host.

Expected Behavior

I expect no error messages, and prompt colors to be displayed correctly.

Current Behavior

I get this error message at connection.

liquidprompt: terminal xterm-256color does not support foreground colors
liquidprompt: terminal xterm-256color does not support background colors
liquidprompt: terminal xterm-256color does not support foreground colors
liquidprompt: terminal xterm-256color does not support background colors

Also my prompt shows no color.

Additional context

My terminal is alacritty, but I tested with some others and the result is always the same.
I have the right terminfos installed in my remote session.

$ ls /etc/terminfo/x/
xterm  xterm-256color  xterm-color  xterm-xfree86

My local session has also alacritty + zsh + liquidprompt, and everything goes well.

I just stumbled upon #586. My local session has tput but the remote alpine session does not.

@azmeuk azmeuk added the bug label Jul 9, 2020
@azmeuk
Copy link
Author

azmeuk commented Jul 9, 2020

Fixed with sudo apk add ncurses to add tput support.

@azmeuk azmeuk closed this as completed Jul 9, 2020
@Rycieos Rycieos reopened this Jul 9, 2020
@Rycieos
Copy link
Collaborator

Rycieos commented Jul 9, 2020

I'm actually going to reopen this, this specific case deserves a better error message. Thanks for the report.

@Rycieos Rycieos added this to the v1.12 milestone Jul 9, 2020
@Rycieos
Copy link
Collaborator

Rycieos commented Jul 9, 2020

Also, strange that you see the error messages twice. Any chance you are loading Liquidprompt twice?

@azmeuk
Copy link
Author

azmeuk commented Jul 9, 2020

Actually yes. Once in ~/.zshrc and once in /etc/zsh/zshrc.

@Rycieos
Copy link
Collaborator

Rycieos commented Jul 16, 2020

I added a warning on startup if tput isn't available. Should be more obvious now what the problem is.

pkkolos pushed a commit to pkkolos/liquidprompt that referenced this issue May 9, 2021
This needs improvement soon, but I didn't want to completely rework this
function yet. Better to provide too much warning than too little at this
point I think.

Ideally in the future we would generate empty color vars so that
printing speed would be even better without the escape codes.

Fixes liquidprompt#615
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants