diff --git a/main.c b/main.c index 85f92f344..c807048a4 100644 --- a/main.c +++ b/main.c @@ -266,6 +266,7 @@ int main( int argc, char **argv ) env_init(); complete_init(); reader_init(); + history_init(); if( read_init() ) { @@ -337,6 +338,7 @@ int main( int argc, char **argv ) proc_fire_event( L"PROCESS_EXIT", EVENT_EXIT, getpid(), res ); + history_destroy(); complete_destroy(); proc_destroy(); env_destroy(); diff --git a/reader.c b/reader.c index 348d245c4..212a7c528 100644 --- a/reader.c +++ b/reader.c @@ -1631,7 +1631,6 @@ static void reader_interactive_init() al_init( &prompt_list ); - history_init(); common_handle_winch(0); @@ -1658,7 +1657,6 @@ static void reader_interactive_destroy() kill_destroy(); al_foreach( &prompt_list, (void (*)(const void *))&free ); al_destroy( &prompt_list ); - history_destroy(); writestr( L"\n" ); set_color( FISH_COLOR_RESET, FISH_COLOR_RESET );