diff options
author | Ron Yorston <rmy@pobox.com> | 2013-08-27 16:10:53 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2013-08-27 16:10:53 +0100 |
commit | 3fd34651ea72ea1c335d3170f234cb0517fd897f (patch) | |
tree | 36e8fc40cffd464ffda4759020777dd3ca23ca31 /shell/ash.c | |
parent | e3ac39098326de084a805d0dd31db9666b734f20 (diff) | |
parent | d6ae4fb446daedfe3073d67be655942e9fa7eb18 (diff) | |
download | busybox-w32-3fd34651ea72ea1c335d3170f234cb0517fd897f.tar.gz busybox-w32-3fd34651ea72ea1c335d3170f234cb0517fd897f.tar.bz2 busybox-w32-3fd34651ea72ea1c335d3170f234cb0517fd897f.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index 8f59dccda..6e6fc6a71 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -9501,6 +9501,9 @@ static int getoptscmd(int, char **) FAST_FUNC; | |||
9501 | #if !ENABLE_FEATURE_SH_EXTRA_QUIET | 9501 | #if !ENABLE_FEATURE_SH_EXTRA_QUIET |
9502 | static int helpcmd(int, char **) FAST_FUNC; | 9502 | static int helpcmd(int, char **) FAST_FUNC; |
9503 | #endif | 9503 | #endif |
9504 | #if MAX_HISTORY | ||
9505 | static int historycmd(int, char **) FAST_FUNC; | ||
9506 | #endif | ||
9504 | #if ENABLE_SH_MATH_SUPPORT | 9507 | #if ENABLE_SH_MATH_SUPPORT |
9505 | static int letcmd(int, char **) FAST_FUNC; | 9508 | static int letcmd(int, char **) FAST_FUNC; |
9506 | #endif | 9509 | #endif |
@@ -9574,6 +9577,9 @@ static const struct builtincmd builtintab[] = { | |||
9574 | #if !ENABLE_FEATURE_SH_EXTRA_QUIET | 9577 | #if !ENABLE_FEATURE_SH_EXTRA_QUIET |
9575 | { BUILTIN_NOSPEC "help" , helpcmd }, | 9578 | { BUILTIN_NOSPEC "help" , helpcmd }, |
9576 | #endif | 9579 | #endif |
9580 | #if MAX_HISTORY | ||
9581 | { BUILTIN_NOSPEC "history" , historycmd }, | ||
9582 | #endif | ||
9577 | #if JOBS | 9583 | #if JOBS |
9578 | { BUILTIN_REGULAR "jobs" , jobscmd }, | 9584 | { BUILTIN_REGULAR "jobs" , jobscmd }, |
9579 | { BUILTIN_REGULAR "kill" , killcmd }, | 9585 | { BUILTIN_REGULAR "kill" , killcmd }, |
@@ -10155,7 +10161,12 @@ preadfd(void) | |||
10155 | * _during_ shell execution, not only if it was set when | 10161 | * _during_ shell execution, not only if it was set when |
10156 | * shell was started. Therefore, re-check LANG every time: | 10162 | * shell was started. Therefore, re-check LANG every time: |
10157 | */ | 10163 | */ |
10158 | reinit_unicode(lookupvar("LANG")); | 10164 | { |
10165 | const char *s = lookupvar("LC_ALL"); | ||
10166 | if (!s) s = lookupvar("LC_CTYPE"); | ||
10167 | if (!s) s = lookupvar("LANG"); | ||
10168 | reinit_unicode(s); | ||
10169 | } | ||
10159 | nr = read_line_input(line_input_state, cmdedit_prompt, buf, IBUFSIZ, timeout); | 10170 | nr = read_line_input(line_input_state, cmdedit_prompt, buf, IBUFSIZ, timeout); |
10160 | if (nr == 0) { | 10171 | if (nr == 0) { |
10161 | /* Ctrl+C pressed */ | 10172 | /* Ctrl+C pressed */ |
@@ -13163,6 +13174,15 @@ helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
13163 | } | 13174 | } |
13164 | #endif /* FEATURE_SH_EXTRA_QUIET */ | 13175 | #endif /* FEATURE_SH_EXTRA_QUIET */ |
13165 | 13176 | ||
13177 | #if MAX_HISTORY | ||
13178 | static int FAST_FUNC | ||
13179 | historycmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | ||
13180 | { | ||
13181 | show_history(line_input_state); | ||
13182 | return EXIT_SUCCESS; | ||
13183 | } | ||
13184 | #endif | ||
13185 | |||
13166 | /* | 13186 | /* |
13167 | * The export and readonly commands. | 13187 | * The export and readonly commands. |
13168 | */ | 13188 | */ |