Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

$TERM supports 256 colors, but don't have colors #333

Closed
chriselrod opened this issue Oct 26, 2023 · 5 comments
Closed

$TERM supports 256 colors, but don't have colors #333

chriselrod opened this issue Oct 26, 2023 · 5 comments

Comments

@chriselrod
Copy link
Contributor

chriselrod commented Oct 26, 2023

If I start Julia with

> TERM=xterm-256color julia

I do get colors, but not when using my default $TERM value (foot, for reference).

> infocmp $TERM | grep color
	colors#0x100, cols#80, it#8, lines#24, pairs#0x10000,
> infocmp xterm-256color | grep color
#	Reconstructed via infocmp from file: /usr/share/terminfo/x/xterm-256color
xterm-256color|xterm with 256 colors,
	colors#0x100, cols#80, it#8, lines#24, pairs#0x10000,
> infocmp xterm | grep color
	colors#8, cols#80, it#8, lines#24, pairs#64,

My terminfo does indeed say that I have colors#0x100 (0x100==256), just like it does for xterm-256color.

@Moelf
Copy link
Contributor

Moelf commented Oct 26, 2023

idk why I am seeing color
image

@KristofferC
Copy link
Owner

So this only happens with OhMyREPL loaded? Could maybe be related to JuliaLang/julia#50797?

@chriselrod
Copy link
Contributor Author

chriselrod commented Oct 26, 2023

So this only happens with OhMyREPL loaded? Could maybe be related to JuliaLang/julia#50797?

Yeah, that seems likely to be the cause.
My problem is unrelated to OhMyREPL.

julia> for i = 0:255; printstyled("$i\t";color=i); i%16==15&&println(); end

No color, not even on Julia, when starting with --startup=no.
Any chance you can try Julia master, @Moelf ? I'm guessing that PR didn't make it into 1.10.

@Moelf
Copy link
Contributor

Moelf commented Oct 26, 2023

image

still seems fine on master

@chriselrod
Copy link
Contributor Author

chriselrod commented Oct 26, 2023

Hmm

julia> Base.find_terminfo_file("foot")

julia> Base.find_terminfo_file("xterm")

julia>

because

dir = "/home/chriselrod/.terminfo"

because

    terminfo_dirs = if haskey(ENV, "TERMINFO")
        [ENV["TERMINFO"]]
    elseif isdir(joinpath(homedir(), ".terminfo"))
        [joinpath(homedir(), ".terminfo")]
    elseif haskey(ENV, "TERMINFO_DIRS")
        split(ENV["TERMINFO_DIRS"], ':')
    elseif Sys.isunix()
        ["/usr/share/terminfo"]
    else
        String[]
    end

so rm -r ~/.terminfo fixed it.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants