Skip to content

Not loading/parsing unknown terminfo files #2962

@mitchellh

Description

@mitchellh

Describe the bug
Hi! 👋 I'm working on a new terminal emulator. It is very full featured and has dozens of full time testers. One recently reported lazygit doesn't work in it, and I realized that doing TERM=xterm-256color lazygit fixes everything.

Ghostty sets TERM to xterm-ghostty but also sets TERMINFO to a valid terminfo database path. (See https://man7.org/linux/man-pages/man5/terminfo.5.html) See below:

CleanShot 2023-08-26 at 08 10 30@2x

To Reproduce
I can get you access to the terminal, but running lazygit with a TERM thats unknown and a TERMINFO set to a path that defines $TERM will work just as well.

Expected behavior
lazygit should dynamically parse terminfo to accept terminals it doesn't know about.

Screenshots
The below happens instead, but it renders and functions perfectly if I set TERM=xterm-256color.

CleanShot 2023-08-26 at 08 12 12@2x

Version info:

commit=, build date=, build source=homebrew, version=0.40.2, os=darwin, arch=arm64, git version=2.36.0

Additional context
I dug into it a bit and it looks like your dependency tcell supports dynamically parsing terminfo/termcap files. Please let me know if I'm doing anything wrong here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions