From 350d26bbbb127284cefb877b8380049e65665b15 Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Tue, 3 Dec 2002 22:45:46 +0000 Subject: - the number of commands in the history list is now configureable via the config system - added a new config option to allow persistant history lists. This is currently only used by ash, but the calls ({load,save}_history) could be added to the other shells as well. --- shell/ash.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'shell/ash.c') diff --git a/shell/ash.c b/shell/ash.c index d20618d3c..bec37cfcc 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -7356,6 +7356,10 @@ int ash_main(int argc, char **argv) if (sflag || minusc == NULL) { state4: /* XXX ??? - why isn't this before the "if" statement */ +#ifdef CONFIG_FEATURE_COMMAND_SAVEHISTORY + if ( iflag ) + load_history ( ".ash_history" ); +#endif cmdloop(1); } #if PROFILE @@ -7546,6 +7550,11 @@ static int exitcmd(int argc, char **argv) { if (stoppedjobs()) return 0; +#ifdef CONFIG_FEATURE_COMMAND_SAVEHISTORY + if ( iflag ) + save_history ( ".ash_history" ); +#endif + if (argc > 1) exitstatus = number(argv[1]); else -- cgit v1.2.3