diff options
author | Robert Griebl <griebl@gmx.de> | 2002-12-03 22:45:46 +0000 |
---|---|---|
committer | Robert Griebl <griebl@gmx.de> | 2002-12-03 22:45:46 +0000 |
commit | 350d26bbbb127284cefb877b8380049e65665b15 (patch) | |
tree | 82f389342d1b840a6daf6a9b0e9ada9eba108693 /shell/ash.c | |
parent | 3ba7ceebfc8035fa618c99b27f6995a5bc6997ac (diff) | |
download | busybox-w32-350d26bbbb127284cefb877b8380049e65665b15.tar.gz busybox-w32-350d26bbbb127284cefb877b8380049e65665b15.tar.bz2 busybox-w32-350d26bbbb127284cefb877b8380049e65665b15.zip |
- 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.c | 9 |
1 files changed, 9 insertions, 0 deletions
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) | |||
7356 | 7356 | ||
7357 | if (sflag || minusc == NULL) { | 7357 | if (sflag || minusc == NULL) { |
7358 | state4: /* XXX ??? - why isn't this before the "if" statement */ | 7358 | state4: /* XXX ??? - why isn't this before the "if" statement */ |
7359 | #ifdef CONFIG_FEATURE_COMMAND_SAVEHISTORY | ||
7360 | if ( iflag ) | ||
7361 | load_history ( ".ash_history" ); | ||
7362 | #endif | ||
7359 | cmdloop(1); | 7363 | cmdloop(1); |
7360 | } | 7364 | } |
7361 | #if PROFILE | 7365 | #if PROFILE |
@@ -7546,6 +7550,11 @@ static int exitcmd(int argc, char **argv) | |||
7546 | { | 7550 | { |
7547 | if (stoppedjobs()) | 7551 | if (stoppedjobs()) |
7548 | return 0; | 7552 | return 0; |
7553 | #ifdef CONFIG_FEATURE_COMMAND_SAVEHISTORY | ||
7554 | if ( iflag ) | ||
7555 | save_history ( ".ash_history" ); | ||
7556 | #endif | ||
7557 | |||
7549 | if (argc > 1) | 7558 | if (argc > 1) |
7550 | exitstatus = number(argv[1]); | 7559 | exitstatus = number(argv[1]); |
7551 | else | 7560 | else |