- 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.
This commit is contained in:
Robert Griebl
2002-12-03 22:45:46 +00:00
parent 3ba7ceebfc
commit 350d26bbbb
4 changed files with 69 additions and 1 deletions

View File

@@ -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