diff options
author | Ron Yorston <rmy@pobox.com> | 2022-05-06 12:31:21 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2022-05-06 12:31:21 +0100 |
commit | ecdc5b3ffabb58e3a9fc3a55a2a44323644995fc (patch) | |
tree | 7a394f48dea0e8e5f47c4ab0eba84d2fb04a00b0 /shell | |
parent | 26ba73098e714459e3294679228a1d54eed14799 (diff) | |
download | busybox-w32-ecdc5b3ffabb58e3a9fc3a55a2a44323644995fc.tar.gz busybox-w32-ecdc5b3ffabb58e3a9fc3a55a2a44323644995fc.tar.bz2 busybox-w32-ecdc5b3ffabb58e3a9fc3a55a2a44323644995fc.zip |
win32: allow preference for applets to be disabled at runtime
The default busybox-w32 configuration enables the PREFER_APPLETS
and SH_STANDALONE features. Sometimes it may be desirable to
override the default preference for applets, for example, if an
applet needs to be replaced by an external program with additional
features.
Add support for the environment variable BB_OVERRIDE_APPLETS.
Its value may be:
- a single dash ('-'): all applets are overridden;
- a space-separated list of names: only the specified applets
are overridden.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/shell/ash.c b/shell/ash.c index 6c1e58d6f..f42dc49c3 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -14961,10 +14961,12 @@ helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
14961 | { | 14961 | { |
14962 | const char *a = applet_names; | 14962 | const char *a = applet_names; |
14963 | while (*a) { | 14963 | while (*a) { |
14964 | col += out1fmt("%c%s", ((col == 0) ? '\t' : ' '), a); | 14964 | if (is_applet_preferred(a)) { |
14965 | if (col > 60) { | 14965 | col += out1fmt("%c%s", ((col == 0) ? '\t' : ' '), a); |
14966 | out1fmt("\n"); | 14966 | if (col > 60) { |
14967 | col = 0; | 14967 | out1fmt("\n"); |
14968 | col = 0; | ||
14969 | } | ||
14968 | } | 14970 | } |
14969 | while (*a++ != '\0') | 14971 | while (*a++ != '\0') |
14970 | continue; | 14972 | continue; |