diff options
author | Flemming Madsen <busybox@themadsens.dk> | 2013-04-07 18:47:24 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2013-04-07 18:47:24 +0200 |
commit | d96ffda62e9f9c88a6e43dc1926c5b775a611166 (patch) | |
tree | f5c691e02aae158e04b797e267f3fa779d591728 /shell/ash.c | |
parent | 3beab83e4f7f4213c185737e95dc4895f0059dd6 (diff) | |
download | busybox-w32-d96ffda62e9f9c88a6e43dc1926c5b775a611166.tar.gz busybox-w32-d96ffda62e9f9c88a6e43dc1926c5b775a611166.tar.bz2 busybox-w32-d96ffda62e9f9c88a6e43dc1926c5b775a611166.zip |
ash,hush: history builtin
function old new delta
show_history - 39 +39
builtin_history - 16 +16
historycmd - 13 +13
bltins1 312 324 +12
builtintab 336 344 +8
popstring 134 140 +6
hush_main 1048 1046 -2
ash_main 1398 1396 -2
size_from_HISTFILESIZE 44 40 -4
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 3/3 up/down: 94/-8) Total: 86 bytes
Signed-off-by: Flemming Madsen <busybox@themadsens.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c index edcb7c028..6af14f551 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -9033,6 +9033,9 @@ static int getoptscmd(int, char **) FAST_FUNC; | |||
9033 | #if !ENABLE_FEATURE_SH_EXTRA_QUIET | 9033 | #if !ENABLE_FEATURE_SH_EXTRA_QUIET |
9034 | static int helpcmd(int, char **) FAST_FUNC; | 9034 | static int helpcmd(int, char **) FAST_FUNC; |
9035 | #endif | 9035 | #endif |
9036 | #if MAX_HISTORY | ||
9037 | static int historycmd(int, char **) FAST_FUNC; | ||
9038 | #endif | ||
9036 | #if ENABLE_SH_MATH_SUPPORT | 9039 | #if ENABLE_SH_MATH_SUPPORT |
9037 | static int letcmd(int, char **) FAST_FUNC; | 9040 | static int letcmd(int, char **) FAST_FUNC; |
9038 | #endif | 9041 | #endif |
@@ -9106,6 +9109,9 @@ static const struct builtincmd builtintab[] = { | |||
9106 | #if !ENABLE_FEATURE_SH_EXTRA_QUIET | 9109 | #if !ENABLE_FEATURE_SH_EXTRA_QUIET |
9107 | { BUILTIN_NOSPEC "help" , helpcmd }, | 9110 | { BUILTIN_NOSPEC "help" , helpcmd }, |
9108 | #endif | 9111 | #endif |
9112 | #if MAX_HISTORY | ||
9113 | { BUILTIN_NOSPEC "history" , historycmd }, | ||
9114 | #endif | ||
9109 | #if JOBS | 9115 | #if JOBS |
9110 | { BUILTIN_REGULAR "jobs" , jobscmd }, | 9116 | { BUILTIN_REGULAR "jobs" , jobscmd }, |
9111 | { BUILTIN_REGULAR "kill" , killcmd }, | 9117 | { BUILTIN_REGULAR "kill" , killcmd }, |
@@ -12621,6 +12627,15 @@ helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
12621 | } | 12627 | } |
12622 | #endif /* FEATURE_SH_EXTRA_QUIET */ | 12628 | #endif /* FEATURE_SH_EXTRA_QUIET */ |
12623 | 12629 | ||
12630 | #if MAX_HISTORY | ||
12631 | static int FAST_FUNC | ||
12632 | historycmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | ||
12633 | { | ||
12634 | show_history(line_input_state); | ||
12635 | return EXIT_SUCCESS; | ||
12636 | } | ||
12637 | #endif | ||
12638 | |||
12624 | /* | 12639 | /* |
12625 | * The export and readonly commands. | 12640 | * The export and readonly commands. |
12626 | */ | 12641 | */ |