Perhaps it's from updating Brew (I use Homebrew Bash and Zsh on Mac), but Zsh can no longer find xterm definitions.
For instance, in my .zshrc file I have the following:

export TERM=xterm-256color

This always worked properly up until today. Now the command line responds with:

zsh: can't find terminal definition for xterm-256color

I tried exporting TERM manually, setting different definitions (export TERM=xterm etc.) and reinstalling Zsh with no luck. All native terminal definitions are not found. Interestingly, this is not a problem in other shells (Bash, etc). It's just in Zsh.

If I comment out the export in .zshrc, Kitty still works normally because it uses its own xterm-kitty, but the basic Terminal is totally broken (no color, unusable key bindings).

Any idea what's going on here?

  • 1
    A couple of possibilities: you may have set TERMINFO to point to the terminal database used in Brew, or you might have installed a zsh from Brew. (more likely the former, especially if Brew uses a different pathname convention than MacOS). Nov 16, 2021 at 0:34

1 Answer 1


Turns out TERMINFO is not set in my environmental variables. A fix for now is to add this to my .zshrc file:

export TERMINFO='/usr/share/terminfo/'

This doesn't explain why it is not set anymore, but it works for now. Thanks to @ThomasDickey for the help!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .