summaryrefslogtreecommitdiff
path: root/variables.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2011-12-03 22:43:25 -0500
committerChet Ramey <chet.ramey@case.edu>2011-12-03 22:43:25 -0500
commitdc8fbaf9a166e0d0aefbde426ad66bfcdeabb931 (patch)
treebf497181a5a2af5b6775e3376916c64b060f7592 /variables.c
parent5e4a95c7941a9e29b0bacb752c4e4a50c1385bbd (diff)
downloadbash-dc8fbaf9a166e0d0aefbde426ad66bfcdeabb931.tar.gz
commit bash-20051222 snapshot
Diffstat (limited to 'variables.c')
-rw-r--r--variables.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/variables.c b/variables.c
index 7772012b..d54f10a2 100644
--- a/variables.c
+++ b/variables.c
@@ -483,8 +483,10 @@ initialize_shell_variables (env, privmode)
set_if_not ("HISTFILE", name);
free (name);
+#if 0
set_if_not ("HISTSIZE", "500");
sv_histsize ("HISTSIZE");
+#endif
}
#endif /* HISTORY */
@@ -4016,19 +4018,19 @@ sv_histsize (name)
{
if (legal_number (temp, &num))
{
+ hmax = num;
if (name[4] == 'S')
{
- hmax = num;
stifle_history (hmax);
- num = where_history ();
- if (history_lines_this_session > num)
- history_lines_this_session = num;
+ hmax = where_history ();
+ if (history_lines_this_session > hmax)
+ history_lines_this_session = hmax;
}
else
{
- history_truncate_file (get_string_value ("HISTFILE"), (int)num);
- if (num <= history_lines_in_file)
- history_lines_in_file = num;
+ history_truncate_file (get_string_value ("HISTFILE"), hmax);
+ if (hmax <= history_lines_in_file)
+ history_lines_in_file = hmax;
}
}
}