aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c
index bf376bd0d..14472cb61 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -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)) {