aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2023-06-01 13:52:33 +0100
committerRon Yorston <rmy@pobox.com>2023-06-01 14:03:51 +0100
commita1ccb78df0a218d8fa760015f82bca6b7939b95b (patch)
tree2ab8ed04eadafc0ea6f709f2bf3fa5f267135491 /shell
parent82accfc19fcbda7cd2245a727ca493b582fb0994 (diff)
downloadbusybox-w32-a1ccb78df0a218d8fa760015f82bca6b7939b95b.tar.gz
busybox-w32-a1ccb78df0a218d8fa760015f82bca6b7939b95b.tar.bz2
busybox-w32-a1ccb78df0a218d8fa760015f82bca6b7939b95b.zip
ash: enable 'set -/+o noconsole'
Previously the 'noconsole' shell option could only be set as a shell command line option. Allow it to be changed from within the shell by 'set -o noconsole' or 'set +o noconsole'. The console window is now minimised rather than hidden. This makes it easier for the user to access the console when 'noconsole' is in effect. Adds 8-32 bytes. (GitHub issue #325)
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 09e8725bf..fda4541b4 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -10789,6 +10789,9 @@ optschanged(void)
10789#else 10789#else
10790 viflag = 0; /* forcibly keep the option off */ 10790 viflag = 0; /* forcibly keep the option off */
10791#endif 10791#endif
10792#if ENABLE_ASH_NOCONSOLE
10793 hide_console(noconsole);
10794#endif
10792} 10795}
10793 10796
10794struct localvar_list { 10797struct localvar_list {
@@ -16075,11 +16078,6 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
16075 trace_puts_args(argv); 16078 trace_puts_args(argv);
16076#endif 16079#endif
16077 16080
16078#if ENABLE_ASH_NOCONSOLE
16079 if (noconsole)
16080 hide_console();
16081#endif
16082
16083#if ENABLE_PLATFORM_MINGW32 16081#if ENABLE_PLATFORM_MINGW32
16084 if (dirarg) { 16082 if (dirarg) {
16085 chdir(dirarg); 16083 chdir(dirarg);