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
Whitelist TERMINFO environment variable #5445
Conversation
Can you provide the exact reproduction case for this? |
To reproduce:
If readline was actually being used, this would probably lead to weird behavior like backspace not working etc, as ncurses would not know how to interact with the terminal. When I traced this message to the initialization of libedit (terminal.c). As you can see, it is written when ncurses does not find a termcap for the current
As mentioned in the OP, readline is transitively required by debrew.rb. |
Which if any of those variables are customised from the application default values? |
No variables are customized. As I said, I am using the default setup for the application. |
Cool, seems reasonable. Thanks so much for your first contribution! Without people like you submitting PRs we couldn't run this project. You rock, @jacwah! |
@smancill, if you can provide a reproducible scenario when this is necessary -- submit a PR! |
brew style
with your changes locally?brew tests
with your changes locally?The
TERMINFO
environment variable is used by ncurses et al to find files describing current terminal's capabilities (see e.g.man ncurses
). When the variable is filtered out, code usingncurses
down the line gets confused if the terminal is not included in the default termcap database. An example of this is the "Cannot read termcap database; using dumb terminal settings" message described in #4527. This is written by libedit, loaded from irb, loaded from debrew. With this patch the message is not printed any more.An alternative solution is to place termcap files under
~/.terminfo
instead. Some terminals do not do this by default, for instance Kitty.