I'm trying to set TERMINFO="$HOME/.terminfo"
within my .bashrc
script. The reason being is that my terminal isn't in the system terminfo
location, and so I have its terminfo
file in my home directory.
The problem here is that the change doesn't take effect for the current shell, only subshells. I'm guessing it's because readline is being initialized before bash reads the .bashrc
file.
So is there any way to solve this issue? Perhaps some way to re-initialize readline so the changed $TERMINFO
takes effect?
I'm trying to avoid doing an exec bash
after setting it, as then I have to make sure I don't end up in a re-exec loop, and that's just ugly (though doing exec bash
after setting it does work).
EDIT: This is not a issue running the script. I know for a fact the .bashrc
script is being run and that $TERMINFO
is being set. Running echo $TERMINFO
after the shell has finished starting shows the correct value.
EDIT2: It appears this might be bash or readline library version related. I can't duplicate the issue with bash-4.2.20 and readline-6.2_p1, but I can with bash-3.2 and readline-5.1.3.
"No" is an acceptable answer if it's not possible. But it would be nice to know what's going on that causes the answer to be "no".
sv_terminal
invariables.c
) whenTERMINFO
changes at least since 2.05. I haven't looked at readline or tested.