[PATCH] ash/hush: implement -d DELIM option for `read`

Johannes Schindelin Johannes.Schindelin at gmx.de
Tue Aug 8 14:47:09 UTC 2017


Hi,

On Tue, 8 Aug 2017, Kang-Che Sung wrote:

> On Mon, Aug 7, 2017 at 6:18 PM, Johannes Schindelin
> <johannes.schindelin at gmx.de> wrote:
> > The POSIX standard only requires the `read` builtin to handle `-r`:
> > http://pubs.opengroup.org/onlinepubs/9699919799/utilities/read.html
> >
> > However, Bash introduced the option `-d <DELIM>` to override IFS for
> > just one invocation, and it is quite useful.
> >
> > It is also super easy to implement in BusyBox' ash, so let's do that.
> >
> > The motivation: This option is used by Git's test suite.
> >
> > Signed-off-by: Johannes Schindelin <johannes.schindelin at gmx.de>
> 
> Can you wrap the change within a macro conditional like #if BASH_READ_D ?

I can! And I did! It made the patch a little less readable, though.

Ciao,
Johannes


More information about the busybox mailing list