diff options
author | Ron Yorston <rmy@pobox.com> | 2020-04-13 13:13:01 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2020-04-13 13:35:49 +0100 |
commit | 026bf90b29314486d64f93c0633dffda8ac58379 (patch) | |
tree | 3624c2be4bae9038eeaf49c5e80ceef5030d1390 /shell | |
parent | 10e14d5ebdfdfe3acd1cd60692d9cffd07de04e2 (diff) | |
download | busybox-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')
-rw-r--r-- | shell/ash.c | 11 |
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; | |||
2248 | static void change_realtime(const char *) FAST_FUNC; | 2248 | static void change_realtime(const char *) FAST_FUNC; |
2249 | #endif | 2249 | #endif |
2250 | 2250 | ||
2251 | #if ENABLE_PLATFORM_MINGW32 | ||
2252 | static void FAST_FUNC | ||
2253 | change_skip_ansi(const char *newval UNUSED_PARAM) | ||
2254 | { | ||
2255 | skip_ansi_emulation(TRUE); | ||
2256 | } | ||
2257 | #endif | ||
2258 | |||
2251 | static const struct { | 2259 | static 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 | ||
2289 | struct redirtab; | 2300 | struct redirtab; |