aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 1520c5ae5..11ba9774a 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -13143,10 +13143,9 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
13143#if ENABLE_FEATURE_EDITING_SAVEHISTORY 13143#if ENABLE_FEATURE_EDITING_SAVEHISTORY
13144 if (iflag) { 13144 if (iflag) {
13145 const char *hp = lookupvar("HISTFILE"); 13145 const char *hp = lookupvar("HISTFILE");
13146 13146 if (!hp) {
13147 if (hp == NULL) {
13148 hp = lookupvar("HOME"); 13147 hp = lookupvar("HOME");
13149 if (hp != NULL) { 13148 if (hp) {
13150 char *defhp = concat_path_file(hp, ".ash_history"); 13149 char *defhp = concat_path_file(hp, ".ash_history");
13151 setvar("HISTFILE", defhp, 0); 13150 setvar("HISTFILE", defhp, 0);
13152 free(defhp); 13151 free(defhp);
@@ -13195,6 +13194,10 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
13195 const char *hp = lookupvar("HISTFILE"); 13194 const char *hp = lookupvar("HISTFILE");
13196 if (hp) 13195 if (hp)
13197 line_input_state->hist_file = hp; 13196 line_input_state->hist_file = hp;
13197# if ENABLE_FEATURE_SH_HISTFILESIZE
13198 hp = lookupvar("HISTFILESIZE");
13199 line_input_state->max_history = size_from_HISTFILESIZE(hp);
13200# endif
13198 } 13201 }
13199#endif 13202#endif
13200 state4: /* XXX ??? - why isn't this before the "if" statement */ 13203 state4: /* XXX ??? - why isn't this before the "if" statement */