fix setting up and using the terminfo data

There should be just one place that calls `setupterm()`. While refactoring
the code I also decided to not make initializing the curses subsystem a
fatal error. We now try two fallback terminal names ("ansi" and "dumb")
and if those can't be used we still end up with a usable shell.

Fixes #3850
This commit is contained in:
Kurtis Rader
2017-02-15 20:09:26 -08:00
parent 42a320064c
commit 6d02bec4c7
16 changed files with 282 additions and 237 deletions

View File

@@ -294,7 +294,6 @@ static void setup_and_process_keys(bool continuous_mode) {
setup_fork_guards();
env_init();
reader_init();
input_init();
proc_push_interactive(1);
install_our_signal_handlers();