mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 21:44:16 +00:00
Always init history on startup, to avoid destorying history multiple times when reading interactively in a non-interactive script
darcs-hash:20060419095502-ac50b-abf2fe39cf9c027bdbc69d78fe858e946f7c81f2.gz
This commit is contained in:
parent
45d56d8e05
commit
6996c7718e
2 changed files with 2 additions and 2 deletions
2
main.c
2
main.c
|
@ -266,6 +266,7 @@ int main( int argc, char **argv )
|
||||||
env_init();
|
env_init();
|
||||||
complete_init();
|
complete_init();
|
||||||
reader_init();
|
reader_init();
|
||||||
|
history_init();
|
||||||
|
|
||||||
if( read_init() )
|
if( read_init() )
|
||||||
{
|
{
|
||||||
|
@ -337,6 +338,7 @@ int main( int argc, char **argv )
|
||||||
|
|
||||||
proc_fire_event( L"PROCESS_EXIT", EVENT_EXIT, getpid(), res );
|
proc_fire_event( L"PROCESS_EXIT", EVENT_EXIT, getpid(), res );
|
||||||
|
|
||||||
|
history_destroy();
|
||||||
complete_destroy();
|
complete_destroy();
|
||||||
proc_destroy();
|
proc_destroy();
|
||||||
env_destroy();
|
env_destroy();
|
||||||
|
|
2
reader.c
2
reader.c
|
@ -1631,7 +1631,6 @@ static void reader_interactive_init()
|
||||||
|
|
||||||
|
|
||||||
al_init( &prompt_list );
|
al_init( &prompt_list );
|
||||||
history_init();
|
|
||||||
|
|
||||||
common_handle_winch(0);
|
common_handle_winch(0);
|
||||||
|
|
||||||
|
@ -1658,7 +1657,6 @@ static void reader_interactive_destroy()
|
||||||
kill_destroy();
|
kill_destroy();
|
||||||
al_foreach( &prompt_list, (void (*)(const void *))&free );
|
al_foreach( &prompt_list, (void (*)(const void *))&free );
|
||||||
al_destroy( &prompt_list );
|
al_destroy( &prompt_list );
|
||||||
history_destroy();
|
|
||||||
|
|
||||||
writestr( L"\n" );
|
writestr( L"\n" );
|
||||||
set_color( FISH_COLOR_RESET, FISH_COLOR_RESET );
|
set_color( FISH_COLOR_RESET, FISH_COLOR_RESET );
|
||||||
|
|
Loading…
Reference in a new issue