summaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorRobert Griebl2002-12-03 22:45:46 +0000
committerRobert Griebl2002-12-03 22:45:46 +0000
commit350d26bbbb127284cefb877b8380049e65665b15 (patch)
tree82f389342d1b840a6daf6a9b0e9ada9eba108693 /shell/ash.c
parent3ba7ceebfc8035fa618c99b27f6995a5bc6997ac (diff)
downloadbusybox-350d26bbbb127284cefb877b8380049e65665b15.zip
busybox-350d26bbbb127284cefb877b8380049e65665b15.tar.gz
- 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.
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c
index d20618d..bec37cf 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