summaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2020-04-13 13:13:01 +0100
committerRon Yorston <rmy@pobox.com>2020-04-13 13:35:49 +0100
commit026bf90b29314486d64f93c0633dffda8ac58379 (patch)
tree3624c2be4bae9038eeaf49c5e80ceef5030d1390 /shell/ash.c
parent10e14d5ebdfdfe3acd1cd60692d9cffd07de04e2 (diff)
downloadbusybox-w32-026bf90b29314486d64f93c0633dffda8ac58379.tar.gz
busybox-w32-026bf90b29314486d64f93c0633dffda8ac58379.tar.bz2
busybox-w32-026bf90b29314486d64f93c0633dffda8ac58379.zip
ash: reset ANSI emulation when BB_SKIP_ANSI_EMULATION changes
Update the skip status on the first call to skip_ansi_emulation() and whenever the BB_SKIP_ANSI_EMULATION variable changes.
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c
index ca8acd705..4f1fe005b 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -2248,6 +2248,14 @@ static void change_seconds(const char *) FAST_FUNC;
2248static void change_realtime(const char *) FAST_FUNC; 2248static void change_realtime(const char *) FAST_FUNC;
2249#endif 2249#endif
2250 2250
2251#if ENABLE_PLATFORM_MINGW32
2252static void FAST_FUNC
2253change_skip_ansi(const char *newval UNUSED_PARAM)
2254{
2255 skip_ansi_emulation(TRUE);
2256}
2257#endif
2258
2251static const struct { 2259static const struct {
2252 int flags; 2260 int flags;
2253 const char *var_text; 2261 const char *var_text;
@@ -2284,6 +2292,9 @@ static const struct {
2284#if ENABLE_FEATURE_EDITING_SAVEHISTORY 2292#if ENABLE_FEATURE_EDITING_SAVEHISTORY
2285 { VSTRFIXED|VTEXTFIXED|VUNSET, "HISTFILE" , NULL }, 2293 { VSTRFIXED|VTEXTFIXED|VUNSET, "HISTFILE" , NULL },
2286#endif 2294#endif
2295#if ENABLE_PLATFORM_MINGW32
2296 { VSTRFIXED|VTEXTFIXED|VUNSET, bb_skip_ansi_emulation, change_skip_ansi },
2297#endif
2287}; 2298};
2288 2299
2289struct redirtab; 2300struct redirtab;