Re: shell variable references - coding style

2019-03-13 Thread Bruno Haible
Pavel Raiskup wrote: > Is there a gnulib/GNU-preferred way to do this, defined somewhere? I'd > like to avoid such mistakes in future There is no GNU-preferred style, nor a gnulib-preferred style. Just for the gnulib-tool program there is a preferred style. 2019-03-13 Bruno Haible g

Re: shell variable references - coding style

2019-03-13 Thread Paul Eggert
On 3/13/19 5:46 AM, Pavel Raiskup wrote: > > Is there a gnulib/GNU-preferred way to do this, defined somewhere? Not that I'm aware of. Opinions differ. I tend to agree more with Jim Meyering, and prefer a quoting style like this:     save_IFS=$IFS     for arg     do   IFS=$save_IFS   [Som

Re: shell variable references - coding style

2019-03-13 Thread Pavel Raiskup
On Tuesday, February 19, 2019 7:02:08 PM CET Bruno Haible wrote: > Hi Pavel, > > > > [...] > > > This patch fixes both issues, and makes the IFS handling a bit more > > > robust. > > > [...] > > > > > -case $_fpf_arg in > > > +case "$_fpf_arg" in > > > [...] > > > - fpf_dirs=$1 ; shift

Re: shell variable references - coding style

2019-02-19 Thread Jim Meyering
On Tue, Feb 19, 2019 at 10:02 AM Bruno Haible wrote: > > Hi Pavel, > > > > [...] > > > This patch fixes both issues, and makes the IFS handling a bit more > > > robust. > > > [...] > > > > > -case $_fpf_arg in > > > +case "$_fpf_arg" in > > > [...] > > > - fpf_dirs=$1 ; shift > > > - fp

Re: shell variable references - coding style

2019-02-19 Thread Bruno Haible
Hi Pavel, > > [...] > > This patch fixes both issues, and makes the IFS handling a bit more robust. > > [...] > > > -case $_fpf_arg in > > +case "$_fpf_arg" in > > [...] > > - fpf_dirs=$1 ; shift > > - fpf_cb=$1 ; shift > > + fpf_dirs="$1"; shift > > + fpf_cb="$1"; shift > > [...] >