lineedit: add support for history saving on exit

Based on the patch by Dennis Groenen <tj.groenen@gmail.com>

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2011-09-04 16:12:33 +02:00
parent 4840ae8a06
commit bede215cf1
5 changed files with 86 additions and 6 deletions

View File

@ -12888,6 +12888,10 @@ exitshell(void)
char *p;
int status;
#if ENABLE_FEATURE_EDITING_SAVE_ON_EXIT
save_history(line_input_state);
#endif
status = exitstatus;
TRACE(("pid %d, exitshell(%d)\n", getpid(), status));
if (setjmp(loc.loc)) {