On Mon, Jan 9, 2017 at 4:04 PM, Kang-Che Sung <explore...@gmail.com> wrote: > Which of the bash-compatible extensions are supported in ash and hush > are now listed. > > Also be precise about which of the builtins will be enabled in each > option. > > (By the way, I didn't yet have an idea about what ash's "monitor" > (set -m) option will do when job control is disabled at build time.) > > Signed-off-by: Kang-Che Sung <explore...@gmail.com> > --- > shell/ash.c | 30 +++++++++++++++++++++--------- > shell/hush.c | 15 ++++++++++++++- > 2 files changed, 35 insertions(+), 10 deletions(-) > > diff --git a/shell/ash.c b/shell/ash.c > index 9c46a93e0..272682d78 100644 > --- a/shell/ash.c > +++ b/shell/ash.c > @@ -72,7 +72,18 @@ > //config: default y > //config: depends on ASH || SH_IS_ASH || BASH_IS_ASH > //config: help > -//config: Enable bash-compatible extensions. > +//config: Enable bash-compatible extensions, which currently include: > +//config: - 'source' builtin > +//config: - '[[' builtin (if 'test' builtin is also enabled) > +//config: - 'function' keyword > +//config: - pipefail option ('set -o pipefail') > +//config: - $'...' expansion > +//config: - ${var:position:length} expansion > +//config: - ${var/pattern/replacement} expansion > +//config: - ${var//pattern/replacement} expansion > +//config: - $HOSTNAME variable > +//config: - $SHLVL variable > +//config: - '&>' redirection ('&>file' equivalent to '>file 2>&1')
This would create a list which almost no one reads but it would need to be kept updated in sync with code changes - which usually is forgotten :/ Been there... For an example of stale text, see the top-level TODO file. > --- a/shell/hush.c > +++ b/shell/hush.c > @@ -100,7 +100,17 @@ > //config: default y > //config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH > //config: help > -//config: Enable bash-compatible extensions. > +//config: Enable bash-compatible extensions, which currently include: > +//config: - 'source' builtin > +//config: - '[[' builtin ('test' and '[' builtin are always enabled > +//config: regardless) > +//config: - ${var:position:length} expansion (if math support is also > +//config: enabled) > +//config: - ${var/pattern/replacement} expansion > +//config: - ${var//pattern/replacement} expansion > +//config: - $HOSTNAME variable > +//config: Brace expansion is available as a separate config option > +//config: (HUSH_BRACE_EXPANSION). Same here. _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox